Error message: (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)


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

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

asked on Stack Overflow Nov 10, 2011 by learning

15 Answers


Typically, to troubleshoot this, you go to SQL Server Configuration Manager (SSCM) and:

  1. ensure Shared Memory protocol is enabled
  2. ensure Named Pipes protocol is enabled
  3. ensure TCP/IP is enabled, and is ahead of the Named Pipes in the settings

Maybe it can help: Could not open a connection to SQL Server

answered on Stack Overflow Nov 10, 2011 by DimonZa • edited Aug 28, 2019 by Uwe Keim

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.

To change to mixed mode auth you can follow the instructions at

answered on Stack Overflow Jul 27, 2012 by LowWalker • edited Nov 1, 2016 by Sachin Joseph

I had the same error by in 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

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

I spend quite some time figuring this out. Finally running the following code fixed my problem.

sp_configure 'show advanced options', 1;


sp_configure 'user connections', 0


More on here and here


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".

answered on Stack Overflow Apr 3, 2012 by Hammad Khan • edited Feb 15, 2018 by Hammad Khan

Just another possibility. I had to restart the sql server service to fix this issue for me.

answered on Stack Overflow Jan 25, 2012 by khr055

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.

answered on Stack Overflow May 21, 2013 by DupDup

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.

answered on Stack Overflow Jul 28, 2017 by user3226665

Check if your connection string has "Trusted_Connection=true" added.

answered on Stack Overflow Feb 20, 2019 by Rukshala Weerasinghe • edited Jun 27, 2019 by Rukshala Weerasinghe

I was getting this error today. In my case, looking at the ERRORLOG file on the SQL server gave me this error:

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.

answered on Stack Overflow Jun 20, 2016 by Scotty

I forgot to add the "Password=xxx;" in the connection string in my case.

answered on Stack Overflow Apr 24, 2017 by Charles HETIER

By looking into SQL SERVER log file 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: ]"

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.

answered on Stack Overflow Nov 8, 2018 by Will Yang

Enable Mixed authentication mode while installing MSSQL server. Also provide password for sa user.

answered on Stack Overflow May 2, 2013 by Sakib

This is old but I had the problem in the connect dialog that it was still defaulting to a database I had removed. And by running those commands the default database in the prompt wasn't changing. I read somewhere I can't find now, that if you open the "Connect to Server" dialog and then select "Options" and select "Connection Properties" tab by typing the default database (no by selecting from the drop down) the the database will then stay on that new value entered. This sounds like a flaw to me but in case someone was wondering about that, that should fix the issue, at least on SQL Server 2012

answered on Stack Overflow Mar 29, 2017 by user3223834

Hi Just enable both for server authentication as per screen shot attached below.

enter image description here

answered on Stack Overflow Dec 3, 2017 by Deepak Bajaj • edited Dec 3, 2017 by alexander.polomodov

All good and valid courses of investigation especially the logs for more info.

For those hitting this it might be a simple gotcha where when you have created the DB User you may have enforced a password policy and left the user to change the password on first login (i.e. left the checkboxes around the password field at their default values).

Very easily done in SQL Management Studio and can of course cause authentication issues off the bat that are masked unless you look into the logs.

answered on Stack Overflow Jul 13, 2019 by Cueball 6118

The "real" error was in the SQL error log:

C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\log\ERRORLOG

Path will depend on your version of SQL Server

answered on Stack Overflow Sep 5, 2019 by Kolob Canyon

User contributions licensed under CC BY-SA 3.0