简体   繁体   English

从Visual Studio到SQL Server 2005的连接

[英]Connection from Visual Studio to SQL Server 2005

In Visual Studio 2010 I am trying to set up a connection with a SQL Server database with the add connection wizard but the connection fails! 在Visual Studio 2010中,我试图使用add connection向导建立与SQL Server数据库的add connection但是连接失败!

This is the error I get: 这是我得到的错误:

a network-related or instance-specific error occured while establishing a connection to SQL server. 建立与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. 验证实例名称正确,并且已将SQL Server配置为允许远程连接。 (provider:Named Pipes Provider, error:40 -Could not open a connection to SQL Server) (提供者:命名管道提供程序,错误:40-无法打开与SQL Server的连接)

Extra info; 额外信息;

  • I can ping the server! 我可以ping服务器!
  • Remote connections are allowed on the SQL Server! SQL Server允许远程连接!
  • SQL service is running! SQL服务正在运行!

What is here the problem? 这是什么问题?

To work around this problem, use one of the following methods depending on the symptom that you are experiencing: 要变通解决此问题,请根据您遇到的症状使用以下方法之一:

  • A SQL Server login SQL Server登录

Use a valid Windows login to connect to SQL Server. 使用有效的Windows登录名连接到SQL Server。 If you must continue to use a SQL Server login, you can change the security authentication mode in SQL Server to SQL Server and Windows. 如果必须继续使用SQL Server登录名,则可以将SQL Server中的安全身份验证模式更改为SQL Server和Windows。

  • A Windows account with insufficient permissions Windows帐户权限不足

To work around this problem, you must add the Windows account to SQL Server, and then grant the appropriate permissions to each database that the user requires access to. 要变通解决此问题,您必须将Windows帐户添加到SQL Server,然后为用户需要访问的每个数据库授予适当的权限。

Source: http://support.microsoft.com/kb/889615/en-us 来源: http//support.microsoft.com/kb/889615/en-us

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从Visual Studio调试SQL Server 2005中的存储过程? - Debugging stored procedure in SQL Server 2005 from Visual Studio? Visual Studio 2008和SQL Server 2005 - Visual Studio 2008 and SQL Server 2005 初始安装和从Visual Studio连接到Microsoft SQL Server的问题 - trouble with initial setup and connection to microsoft sql server from Visual Studio 从Visual Studio 2013连接到远程SQL Server 2012 - Connection to Remote SQL Server 2012 from Visual Studio 2013 SQL Server 2005 Express与Visual Web Developer 2008 Express的连接 - SQL Server 2005 express connection with Visual Web Developer 2008 express 将Visual Studio设置为创建SQL Server 2005支持的mdf文件 - Set Visual Studio to create mdf file that SQL Server 2005 supports SQL Server 2005 SP 在远程主机上的 Visual Studio 2008 调试 - Visual Studio 2008 Debugging of SQL Server 2005 SP on Remote Host Visual Studio 2005不支持Sql Server 2008 - Visual Studio 2005 doesn't support Sql Server 2008 从SQL Server 2016到SQL Server Management Studio 2005的ETL - ETL from SQL Server 2016 to SQL Server Management Studio 2005 Visual Studio中的SQL Server连接停止工作 - SQL server connection in Visual Studio stop working
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM