Tested on SQL Server 2008, 2008 R2, 2012 and 2014.
In this blog, I would like discuss about one of most commonly faced issues that you may encounter when connecting to the SQL Server. When you try to connect SQL Server you may get the error below. The error can occur while connecting to SQL Server from any custom application and also from SQL Server Management Studio (SSMS). You may not be able to connect to the SQL Server locally as well.
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.) (Microsoft SQL Server, Error: 233).
If you go to SQL Server machine and check for the SQL Server Error logs (default location: C:\Program Files\Microsoft SQL Server\MSSQLXX.<InstanceName>\MSSQL\Log) you will the below error message.
2015-07-07 14:19:14.82 Logon Could not connect because the maximum number of '1' user connections has already been reached. The system administrator can use sp_configure to increase the maximum value. The connection has been closed. [CLIENT: XX.XX.XX.XX]
The above error message from SQL Server Error log says that the SQL Server is configured to accept a maximum of 1 active connection.
In order to solve the issue you have to close all the existing active connections and change maximum concurrent connections to infinite from command prompt.
1. Close all concurrent SQL Server connections from command prompt. To do this, run the command below from command prompt window (cmd).
(The above command is for the default instance of the SQL Server (MSSQLSERVER), for a named instance of SQL Server provide the name of the instance after the –s switch. Also this is default path of sqlservr.exe. If you have installed SQL Server in a different path, use that path instead. )
2. Open another command prompt (cmd) as an administrator and execute the command below to connect SQL Server.
(In the above command, we are connecting to a default instance of SQL Server using windows authentication. Please check the below article for the other available switches)
You can also change the number of concurrent SQL Server connection from the SQL Server Management Studio (SSMS) (Properties->Connections->Maximum number of concurrent connections), but in my case since the connection from SSMS was not successful, we made the changes using command prompt.
Please drop in your comments or connect with Microsoft BI-ONE CSS team if you are still encountering the same issue even after performing the above steps.
Author: Jaideep Saha Roy - SQL Server BI-ONE Developer team, Microsoft
Reviewer: Krishnakumar Rukmangathan – SQL Server BI-ONE Developer Team, Technical Advisor, Microsoft