建立与SQL Server的连接时发生与网络相关或特定于实例的错误。服务器未找到或无法访问。 [英] A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible.

查看:106
本文介绍了建立与SQL Server的连接时发生与网络相关或特定于实例的错误。服务器未找到或无法访问。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





有谁知道为什么会出现这个错误?



网络相关或建立与SQL Server的连接时发生特定于实例的错误。服务器未找到或无法访问。验证实例名称是否正确,以及SQL Server是否配置为允许远程连接。 (提供者:命名管道提供程序,错误:40 - 无法打开与SQL Server的连接)如何解决此错误?



Can anyone know why this error comeing?

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)how to solve this error?

推荐答案

错误非常明确 - 它甚至会告诉你该怎么做。

检查你的连接字符串 - 很可能它没有正确引用SQL服务器实例。
The error is pretty explicit - and it even tells you what to do.
Check your connection string - in all probability it does not reference the SQL server instance correctly.


检查这些东西

1.确保您的数据库引擎配置为接受远程连接(我使用的是集中式数据库)

•开始>所有程序> SQL Server 2005>配置工具> SQL Server表面区域配置

•单击服务和连接的表面区域配置

•选择出现问题的实例>数据库引擎>远程连接

•启用本地和远程连接

•重启实例



2.检查SQL Server服务帐户

•如果您没有使用域帐户作为服务帐户(例如,如果您使用的是NETWORK SERVICE),您可能需要先切换它才能继续使用



3.如果您使用的是命名的SQL Server实例,请确保在ASweb P.NET应用程序的连接字符串中使用该实例名称

•通常是指定数据库服务器所需的格式是machinename \instancename

•检查连接字符串
check these things
1. Make sure your database engine is configured to accept remote connections(I you are using centralized database)
•Start > All Programs > SQL Server 2005 > Configuration Tools > SQL Server Surface Area Configuration
•Click on Surface Area Configuration for Services and Connections
•Select the instance that is having a problem > Database Engine > Remote Connections
•Enable local and remote connections
•Restart instance

2. Check the SQL Server service account
•If you are not using a domain account as a service account (for example if you are using NETWORK SERVICE), you may want to switch this first before proceeding

3.If you are using a named SQL Server instance, make sure you are using that instance name in your connection strings in your ASweb P.NET application
•Usually the format needed to specify the database server is machinename\instancename
•Check your connection string as well


请转到控制面板\所有控制面板项目\管理工具\服务并启动SQL SERVER(SQLEXPRESS)。它将起作用。
Please go Control Panel\All Control Panel Items\Administrative Tools\services and start SQL SERVER(SQLEXPRESS).it will work.


这篇关于建立与SQL Server的连接时发生与网络相关或特定于实例的错误。服务器未找到或无法访问。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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