SQL 错误消息:(提供程序:共享内存提供程序,错误:0 - 管道的另一端没有进程。)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8075784/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error message: (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)
提问by learning
I am trying to deploy my website on windows server 2003. Am i missing something or what is wrong from the following error message, how can I correct it? Thank
我正在尝试在 Windows Server 2003 上部署我的网站。我是否遗漏了什么或以下错误消息有什么问题,我该如何纠正?谢谢
I am having the error message:
我收到错误消息:
A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)]
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +1019
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +108
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +126
System.Data.SqlClient.SqlConnection.Open() +125
NHibernate.Connection.DriverConnectionProvider.GetConnection() +104
NHibernate.Tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.Prepare() +15 NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.GetReservedWords(Dialect dialect, IConnectionHelper connectionHelper) +89
NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.Update(ISessionFactory sessionFactory) +80
NHibernate.Impl.SessionFactoryImpl..ctor(Configuration cfg, IMapping mapping, Settings settings, EventListeners listeners) +599
NHibernate.Cfg.Configuration.BuildSessionFactory() +104
MyProject.API.Data.SessionManager..cctor() in C:\Dev\Code\API\Data\SessionManager.cs:27
已成功与服务器建立连接,但随后在登录过程中出现错误。(提供程序:共享内存提供程序,错误:0 - 管道的另一端没有进程。) 描述:在执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其在代码中的来源的更多信息。
异常详细信息:System.Data.SqlClient.SqlException:与服务器成功建立连接,但随后在登录过程中发生错误。(提供程序:共享内存提供程序,错误:0 - 管道的另一端没有进程。)
源错误:
执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪来识别有关异常来源和位置的信息。
堆栈跟踪:
[SqlException (0x80131904): 已成功与服务器建立连接,但随后在登录过程中出现错误。(提供者:共享内存提供者,错误:0 - 管道的另一端没有进程。)]
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +1019
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +108
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection externalConnection, DbConnectionFactory connectionFactory) +126
System.Data.SqlClient.SqlConnection.Open() +125
NHibernate.Connection.DriverConnectionProvider.GetConnection() +104
NHibernate.Tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.Prepare()15个NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.GetReservedWords(方言方言,IConnectionHelper connectionHelper)89
NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.Update(ISessionFactory的sessionFactory)80
NHibernate.Impl。 SessionFactoryImpl..ctor(Configuration cfg, IMapping mapping, Settings settings, EventListeners listeners) +599
NHibernate.Cfg.Configuration.BuildSessionFactory() +104
MyProject.API.Data.SessionManager..cctor() in C:\Dev\Code\ API\Data\SessionManager.cs:27
采纳答案by DimonZa
Typically, to troubleshoot this, you go to SQL Server Configuration Manager (SSCM) and:
通常,要解决此问题,请转到 SQL Server 配置管理器 (SSCM) 并:
- ensure Shared Memory protocol is enabled
- ensure Named Pipes protocol is enabled
- ensure TCP/IP is enabled, and is ahead of the Named Pipes in the settings
- 确保启用共享内存协议
- 确保命名管道协议已启用
- 确保 TCP/IP 已启用,并且在设置中位于命名管道之前
Maybe it can help: Could not open a connection to SQL Server
也许它可以帮助:无法打开与 SQL Server 的连接
回答by LowWalker
I had this same error message, turns out it was because I didn't have mixed mode auth enabled. I was on Windows Auth only. This is common in default MSSQL deployments for vSphere, and becomes an issue when upgrading to vSphere 5.1.
我有同样的错误消息,原来是因为我没有启用混合模式身份验证。我只使用 Windows 身份验证。这在 vSphere 的默认 MSSQL 部署中很常见,并且在升级到 vSphere 5.1 时会成为一个问题。
To change to mixed mode auth you can follow the instructions at http://support.webecs.com/kb/a374/how-do-i-configure-sql-server-express-to-enable-mixed-mode-authentication.aspx.
要更改为混合模式身份验证,您可以按照http://support.webecs.com/kb/a374/how-do-i-configure-sql-server-express-to-enable-mixed-mode-authentication 上的说明进行操作。 ASPX。
回答by Hammad Khan
I had the same error by in SQL Server Management Studio.
我在 SQL Server Management Studio 中遇到了同样的错误。
I found that to look at the more specific error, look at the log file created by the SQL Server. When I opened the log file, I found this error
我发现要查看更具体的错误,请查看 SQL Server 创建的日志文件。当我打开日志文件时,我发现了这个错误
Could not connect because the maximum number of '2′ user connections has already been reached. The system administrator can use sp_configure to increase the maximum value. The connection has been closed
无法连接,因为已达到“2”用户连接的最大数量。系统管理员可以使用 sp_configure 增加最大值。连接已关闭
I spend quite some time figuring this out. Finally running the following code fixed my problem.
我花了很多时间来弄清楚这一点。最后运行以下代码解决了我的问题。
sp_configure 'show advanced options', 1;
go
reconfigure
go
sp_configure 'user connections', 0
go
reconfigure
go
Edit
编辑
To view logs search for "logs" on windows startup button, click "view events logs". From there go to Applications under "Windows Logs". You can also choose "System" logs to see system wise errors. You can use filter on current logs by clicking "Filter Current Logs" on right side and then select "Error checkbox".
要查看日志在 Windows 启动按钮上搜索“日志”,请单击“查看事件日志”。从那里转到“Windows 日志”下的应用程序。您还可以选择“系统”日志以查看系统错误。您可以通过单击右侧的“过滤当前日志”然后选择“错误复选框”来对当前日志使用过滤器。
回答by khr055
Just another possibility. I had to restart the sql server service to fix this issue for me.
只是另一种可能。我不得不重新启动 sql server 服务来为我解决这个问题。
回答by Rukshala Weerasinghe
Check if your connection string has "Trusted_Connection=true"
added.
检查您的连接字符串是否已"Trusted_Connection=true"
添加。
回答by DupDup
You should enable the Server authentication mode to mixed mode as following: In SQL Studio, select YourServer -> Property -> Security -> Select SqlServer and Window Authentication mode.
您应该将服务器身份验证模式启用为混合模式,如下所示: 在 SQL Studio 中,选择 YourServer -> 属性 -> 安全性 -> 选择 SqlServer 和 Window 身份验证模式。
回答by user3226665
Goto to SQL server using windows Credentials - > Logins - > Select the Login - > in the Properties -> Check if the Log in is enabled/disabled. If Disabled, make it enable, this solution worked for me.
使用 Windows 凭据转到 SQL 服务器 -> 登录 -> 选择登录 -> 在属性中 -> 检查登录是否已启用/禁用。如果已禁用,请将其启用,此解决方案对我有用。
回答by Kolob Canyon
The "real" error was in the SQL error log:
“真正的”错误在 SQL 错误日志中:
C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\log\ERRORLOG
C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\log\ERRORLOG
Path will depend on your version of SQL Server
路径将取决于您的 SQL Server 版本
回答by Will Yang
By looking into SQL SERVER logfile in "C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Log\ERRORLOG", it says "Login failed for user 'XXXXX'. Reason: An attempt to login using SQL authentication failed. Server is configured for Windows authentication only. [CLIENT: ]"
通过查看“C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Log\ERRORLOG”中的SQL SERVER 日志文件,它显示“用户‘XXXXX’登录失败。原因:尝试使用 SQL 身份验证登录失败。服务器仅配置为 Windows 身份验证。[客户端:]”
The fixing method is to open "Microsoft SQL Server Management Studio" -> Right click the SQL server and then select "Properties" -> Security -> Change the authentication to mixed mode. -> Restart SQL server.
修复方法是打开“Microsoft SQL Server Management Studio”->右键单击SQL服务器,然后选择“属性”->安全->将身份验证更改为混合模式。-> 重新启动 SQL 服务器。
回答by Scotty
I was getting this error today. In my case, looking at the ERRORLOG file on the SQL server gave me this error:
我今天收到这个错误。就我而言,查看 SQL 服务器上的 ERRORLOG 文件给了我这个错误:
Login failed for user ''. Reason: Failed to open the database '' specified in the login properties.
用户 '' 登录失败。原因:无法打开登录属性中指定的数据库 ''。
This was because I had deleted the "Default database" of this user a few days ago. Setting the default database to my new database fixed the problem.
这是因为我几天前删除了该用户的“默认数据库”。将默认数据库设置为我的新数据库解决了这个问题。
Hope this helps someone else.
希望这对其他人有帮助。