连接到 Web 上的 SQL Server
我的公司有一台运行 SQL Server 的机器,由一家专门从事此类业务的公司托管。我们有一个连接到它的 .NET 应用程序。
最近决定将这台机器带回家。
如果我们使用机器的内部IP来连接,就可以了。当我们访问外部网络并使用机器的外部IP时,就会失败。机器响应 ping,并且以下文章中的所有端口都已打开。
http://support.microsoft.com/kb/287932
有什么想法吗?
My company had a machine running SQL Server hosted by a company specializing in such. We have an .NET application that connects to it.
Recently the decision was made to bring the machine in house.
If we use the internal IP of the machine to connect, it works. When we go to an outside network and use the machine's external IP, it fails. The machine answers pings, and all of the ports in the following article have been opened.
http://support.microsoft.com/kb/287932
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您确定服务器已配置为接受 tcp 连接吗?打开“SQL Server 配置管理器”。 “MSSQLSERVER 协议”(在树中)确保 TCP/IP 设置为启用。
are you sure that the server is configured to accept tcp connections? open teh "SQL Server Configuration Manager". "Protocols for MSSQLSERVER" (in the tree) be sure that TCP/IP i set to enabled.
您可能需要转到“SQL Surface Area Configuration”,单击树视图中的“Remote Connections”,然后选中“Local and Remote Connections”单选按钮。
You might need to go to 'SQL Surface Area Configuration', click on 'Remote Connections' in the treeview, then check the 'Local and Remote Connections' radiobutton.
防火墙
我假设您已启用 TCP/IP,以及 SQL 浏览器服务。
另外,我假设如果在路由器/NAT 之后,您已经完成了所需的端口触发/端口转发。
最后一件事是确保所有防火墙允许 SQL Server 通过。
Firewalls
I assume you have enabled TCP/IP, and also the SQL Browser Service.
Also I assume if behind a router/NAT, you have done the required Port triggering/Port forwarding.
The final thing would be make sure all firewalls allow SQL Server through.