有人可以帮我解决我的错误.provider:SQL网络接口,错误:26 - 错误查找指定的服务器/实例 [英] could someone help me resolve my error .provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified

查看:82
本文介绍了有人可以帮我解决我的错误.provider:SQL网络接口,错误:26 - 错误查找指定的服务器/实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

add name =libacpConnectionStringconnectionString =Data Source = 103.21.58.192; Initial Catalog = libacp; User ID = libacp_pune020; Password = dfe3ga34dfTTS12 @

providerName =System.Data.SqlClient







error



< pre>建立与SQL Server的连接时发生与网络相关或特定于实例的错误。服务器未找到或无法访问。验证实例名称是否正确,以及SQL Server是否配置为允许远程连接。 (提供者:SQL网络接口,错误:26 - 错误定位指定的服务器/实例)< / pre>

add name="libacpConnectionString" connectionString="Data Source=103.21.58.192;Initial Catalog=libacp;User ID=libacp_pune020;Password=dfe3ga34dfTTS12@"
providerName="System.Data.SqlClient"



error

<pre>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)</pre>

推荐答案

从这里开始:

http://www.sqlmusings.com/2009/03/11/resolving-a-network-related-or-instance-specific-error-occurred-while-establishing-a-connection-to- sql-server / [ ^ ]



HTTP:/ /blogs.msdn.com/b/sql_protocols/archive/2007/05/13/sql-network-interfaces-error-26-error-locating-server-instance-specified.aspx [ ^ ]
Start here :
http://www.sqlmusings.com/2009/03/11/resolving-a-network-related-or-instance-specific-error-occurred-while-establishing-a-connection-to-sql-server/[^]

http://blogs.msdn.com/b/sql_protocols/archive/2007/05/13/sql-network-interfaces-error-26-error-locating-server-instance-specified.aspx[^]


错误非常具体,确实告诉您问题是什么,以及该怎么做! :笑:



您指定的SQL服务器实例(连接字符串中的DataSource)对运行该代码的计算机不可用。 />
有很多可能的原因,但最常见的是:

1)服务器电源关闭

2)你指定了错误的服务器

3)当您将软件发布到生产环境时,您没有更改连接字符串



因此,首先要查看连接字符串的确切内容包含,并检查代码正在执行的网络。检查服务器是否正常,并且SQL实例正在运行(我的开发机器上的LocalHost实现有间歇性问题:它并不总是在启动时启动,我必须手动启动它。我将修复它一个那天,我什么时候可以找时间......)
The error is pretty specific, and does tell you exactly what the problem is, and what to do about it! :laugh:

The instance of SQL server you specified (the "DataSource" in the connection string) is not available to the computer that is running the code.
There are loads of possible reasons why, but the most common are:
1) The server is powered down
2) You specified the wrong server
3) You didn't change your connections string when you released software to production

So start by looking at exactly what the connection string contains, and check that against the network the code is executing on. Check the sever is OK, and the SQL instance is running (I have an intermittent problem with the LocalHost implementation on my dev machine: it doesn't always start on power up and I have to manually start it. I'll fix it one day, when I can find time...)


这篇关于有人可以帮我解决我的错误.provider:SQL网络接口,错误:26 - 错误查找指定的服务器/实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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