A network-related or instance-specific error occurred when applicatoin connect to a DB
2011-04-22 16:20
483 查看
The error as following:
symptom:
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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Cause:
Application log on DB with a instance which is denied or unaccessable.
Solution:
To resolve the issue - I had to change the VSTS Options; From Tools -> Options -> Data Tools -> Data Connection, then set SQL Serevr Instance Name as Blank or an instance name you want.
For example, this paragraph is from a config file, the Server is "./", that means a local server, default instance.
if application need to connect to SQLExpress instance, it should be ...Server=./SQLExpress. Accordingly, you should update the "SQL Serevr Instance Name " in VS also.
<connectionStrings>
<add name="SinaDB"
connectionString="Server=./;Database=ShotgunAccept;Integrated Security=SSPI;"
providerName="System.Data.SqlClient" />
</connectionStrings>
symptom:
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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Cause:
Application log on DB with a instance which is denied or unaccessable.
Solution:
To resolve the issue - I had to change the VSTS Options; From Tools -> Options -> Data Tools -> Data Connection, then set SQL Serevr Instance Name as Blank or an instance name you want.
For example, this paragraph is from a config file, the Server is "./", that means a local server, default instance.
if application need to connect to SQLExpress instance, it should be ...Server=./SQLExpress. Accordingly, you should update the "SQL Serevr Instance Name " in VS also.
<connectionStrings>
<add name="SinaDB"
connectionString="Server=./;Database=ShotgunAccept;Integrated Security=SSPI;"
providerName="System.Data.SqlClient" />
</connectionStrings>
相关文章推荐
- a network-related or instance-specific error occurred while establishing a connection to sql
- vs2008创建database project出错a network-related or instance-specific error occurred while establishing a connection to sql解决
- A network-related or instance-specific error occurred while establishing a connection to SQL Server
- A network-related or instance-specific error occurred while establishing a connection to SQL Server
- a network-related or instance-specific error occurred while establishing a connection to sql server
- SqlServe链接异常:A network-related or instance-specific error occurred ...
- A network-related or instance-specific error occurred while establishing a connection to SQL Server
- a network-related or instance-specific error occurred while establishing a connection to sql server
- An exception of type System.Data.SqlClient.SqlException was thrown. Additional exception information: A network-related or instance-specific error occ
- Error message when you try to modify or to delete an alternate access mapping in Windows SharePoint Services 3.0: "An update conflict has occurred, and you must re-try this action"
- Error = [Microsoft][SQL Server Native Client 11.0]A network-related or instance-specific error has o
- FIX: Error message when you try to install a large Windows Installer package or a large Windows Installer patch package in Windows Server 2003 or in Windows XP: "Error 1718. File was rejected by digital signature policy"
- socket 关闭但端口占用问题 Bind: Address Already in Use Or How to Avoid this Error when Closing TCP Connections
- Tomcat上配置连接池{ connect error=Name [jdbc/OracleDB] is not bound in this Context. Unable to find [jdbc]}
- connect to a specific wifi network in Android programmatically
- github|fatal:unable to access|OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com 443
- sybase连接问题:ct_connect(): network packet layer: internal net library error: Net-Lib protocol driver call to connect two endpoints
- Fatal error occurred when node tried to create too many dynamic partitions
- Error message when you try to use the Live Meeting console to connect to Communications Server 2007: "Live Meeting cannot connect to the meeting."
- git push github失败,提示:SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443