连接数据库中与网络相关的错误 [英] network related error in connecting database

查看:151
本文介绍了连接数据库中与网络相关的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试连接托管数据库时,Management Studio会显示此错误,但是当我从另一台计算机尝试时,它会起作用.
请帮助我解决此问题,我正在使用sql server 2008 r2
谢谢

When i try to connect my hosting database then this error is shown by management studio, but when i try from another computer then it works.
Please help me to solve this issue i am using sql server 2008 r2
Thanks

无法连接到69.162.125.10.

其他信息:
建立与SQL Server的连接时发生与网络相关或特定于实例的错误.服务器未找到或无法访问.验证实例名称正确,并且已将SQL Server配置为允许远程连接. (提供者:命名管道提供程序,错误:40-无法打开与SQL Server的连接)(Microsoft SQL Server,错误:53)

要获取帮助,请单击:此链接 [ ^ ]
Cannot connect to 69.162.125.10.

ADDITIONAL INFORMATION:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)

For help, click: this link[^]

推荐答案

错误消息非常具体:IP地址错误,或者该IP地址远端的SQL Server未配置为接受来自Internet的连接.

首先检查从何处获得SQL连接字符串,然后尝试使用服务器资源管理器"窗格中的信息在VS中配置连接:
1)打开服务器资源管理器.
2)右键单击数据连接",然后选择添加连接"
3)在随后的对话框中,选择您的数据源和数据库,指定安全信息,然后按测试连接"按钮.
4)连接正常后,按确定"
5)在服务器资源管理器"窗格中突出显示您的数据库,然后查看属性"窗格.将显示一个连接字符串的工作示例,您可以将其复制并粘贴到您的应用程序或配置文件中.
The error message is pretty specific: the IP address is wrong, or the SQL server on the far end at that IP address is not configured to accept connections from the internet.

Start by checking wherever you got the SQL connection string from, then try to configure a connection in VS using the info with the Server Explorer pane:
1) Open Server Explorer.
2) Right click "Data connections" and select "Add connection"
3) In the dialog that follows, select your DataSource, and database, specify the security info, and press the "Test connection" button.
4) When the connection works, press "OK"
5) Highlight your database in the Server Explorer pane, and look at the Properties pane. A working example of the connection string will be shown, which you can copy and paste into your app or config file.


这篇关于连接数据库中与网络相关的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆