命名管道提供程序,error:40 - 无法打开到SQL Server的连接? [英] Named Pipes Provider, error: 40 - Could not open a connection to SQL Server?

查看:578
本文介绍了命名管道提供程序,error:40 - 无法打开到SQL Server的连接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们使用NHibernate 2.1.1与SQL Server 2008与.NET 3.5的项目用户。

In our project user using NHibernate 2.1.1 with SQL Server 2008 with .net 3.5.

我现在面临奇怪的问题与SQL Server。我们开发Windows服务,安装了它,它是运行良好的某个时候。不幸的是错误,当我停止SQL Server中,NHibernate的抛出异常

I am facing strange problem with SQL Server. We developed windows service, installed it and it was running fine for sometime. Unfortunately by mistake when I stopped SQL Server, NHibernate throw exception

System.Data.SqlClient.SqlException:在一   网络相关的或实例特定   同时建立了发生错误   连接到SQL Server。服务器   未找到或无法访问。   验证实例名称   正确并且SQL Server是   配置为允许远程   连接。 (provider:命名管道   提供程序,error:40 - 无法打开   连接到SQL Server)

System.Data.SqlClient.SqlException: 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)

但在重新启动SQL Server之后,就无法连接到SQL Server,还是抛出同样的错误。但我可以通过查询分析器/ Management Studio中连接SQL Server中。

But after restarting the SQL Server, it is unable to connect to the SQL Server, still throwing the same error. But I am able to connect SQL Server through Query Analyzer / Management Studio.

请任何机构可以帮助我解决问题?

Please any body can help me in solving the problem?

推荐答案

转到\开始菜单\程序\ Microsoft SQL Server的2008 \配置工具,启动SQL Server配置管理器,使您需要的连接协议。

Go to \Start Menu\Programs\Microsoft SQL Server 2008\Configuration Tools, launch SQL Server Configuration Manager and enable the connection protocols you need.

这篇关于命名管道提供程序,error:40 - 无法打开到SQL Server的连接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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