Visual Studio 2010附加数据库的问题
我在数据库资源管理器中按添加连接,然后输入服务器名称 Rabbitmasterpc
windows Authentication,附加数据库文件: -->我浏览到我附加的数据库..给它一个逻辑名称..单击“确定”。我得到了什么:
“发生网络相关或实例特定的错误 建立与 SQL Server 的连接。找不到服务器或 无法访问。验证实例名称是否正确 SQL Server 配置为允许删除连接。 (提供者: 命名管道提供程序,错误:40-无法打开与 SQL 的连接 服务器)”
更新:
http://www.mssqltips.com/tip.asp?tip=1673
文章说它在侧面..但我里面没有
I press add connection in database explorer then put the server name which is Rabbitmasterpc
windows Authentication, attach a database file: --> I browse to the database i attached.. give it a logical name..click 'ok'. And what I get:
"A network-related or instance specific error occured while
establishing a connection to SQL Server. The server was not found or
was not accessable. Verify that the instance name is correct and that
SQL Server is configured to allow removte connections. (provider:
Named Pipes Provider, error:40- Could not open a connection to SQL
server)"
UPDATE:
http://www.mssqltips.com/tip.asp?tip=1673
The article says it is in facets..but i dont have it inside
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
检查 SQL Server 是否配置为(通过 SQL Server 配置管理器)接受远程连接。
此外,您可能需要检查 Management Studio 中数据库的“连接”属性页以及防火墙设置:
http://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx
Check if SQL Server is configured (via SQL Server Configuration Manager) to accept remote connections.
Also, you may need to check the Connections property page for your database in Management Studio, as well as firewall settings:
http://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx
尝试使用下面的代码打开连接。
Try using code below to open the connection.