No process is on the other end of the pipe (SQL Server 2012)

Sql ServerSql Server-2012

Sql Server Problem Overview


I've got this error:

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)

I know, there are similar questions on this site, and the answer is, to enable TCP/IP and pipes. But I enabled both, and still doesn't work:

MSSQL error

I am using Microsoft SQL Server 2012 and the user has full permissions.

Sql Server Solutions


Solution 1 - Sql Server

The server was set to Windows Authentication only by default. There isn't any notification, that the origin of the errors is that, so it's hard to figure it out. The SQL Management studio does not warn you, even if you create a user with SQL Authentication only.

So the answer is: Switch from Windows to SQL Authentication:

  1. Right click on the server name and select properties;
  2. Select security tab;
  3. Enable the SQL Server and Windows Authentication mode;
  4. Restart the SQL Server service.

You can now connect with your login/password.

Here are the directions by Microsoft: https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/change-server-authentication-mode?view=sql-server-ver15

Solution 2 - Sql Server

To solve this, connect to SQL Management Studio using Windows Authentication, then right-click on server node Properties->Security and enable SQL Server and Windows Authentication mode. If you're using 'sa' make sure the account is enabled. To do this open 'sa' under Logins and view Status.

enable sa admin

If this didn't work, you may need to reinstall SQL Server

Solution 3 - Sql Server

Also you can try to go to services and restart your Sql server instanceenter image description here

Solution 4 - Sql Server

So, I had this recently also, for integrated security, It turns out that my issue was actually fairly simple to fix but mainly because I had forgotten to add "Trusted_Connection=True" to my connection string.

I know that may seem fairly obvious but it had me going for 20 minutes or so until I realised that I had copied my connection string format from connectionstrings.com and that portion of the connection string was missing.

Simple and I feel a bit daft, but it was the answer for me.

Solution 5 - Sql Server

Another reason for this error could be incorrect or non-existent database name.

Forcing the TCP/IP connection (by providing 127.0.0.1 instead of localhost or .) can reveal the real reason for the error. In my case, the database name specified in connection string was incorrect.

So, here is the checklist:

  • Make sure Named Pipe is enabled in configuration manager (don't forget to restart the server).
  • Make sure the database you are connecting to exists.
  • Make sure SQL Server Authentication (or Mixed Mode) is enabled.

Solution 6 - Sql Server

Please check this also enter image description here Also check in configuration TCP/IP,Names PipeLine and shared memory enabled

Solution 7 - Sql Server

If you are trying to login with SQL credentials, you can also try changing the LoginMode for SQL Server in the registry to allow both SQL Server and Windows Authentication.

  1. Open regedit
  2. Go to the SQL instance key (may vary depending on your instance name): Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQLServer\
  3. Set LoginMode to 2

enter image description here

  1. Restart SQL service and SQL Server Management Studio and try again.

Solution 8 - Sql Server

I face this issue for the second time and all previous answers failed, fortunately the following request do the job:

Alter login [user] with CHECK_POLICY = OFF
go

Alter login [user] with CHECK_POLICY = ON
go

Solution 9 - Sql Server

For me the password expired for my login user, and i got the same exception. Then i login with Windows Authentication mode and change the password for the associated user, and it solved my problem.

Solution 10 - Sql Server

Yup, this error might as well be "something failed, good luck figuring out what" - In my case it was a wrong username. SQL Server 2019 RC1.

Solution 11 - Sql Server

Had this error too, the cause was simple, but not obvious: incorrect password. Not sure why I didn't get just "Login failed" from freshly installed SQL 2016 server.

Solution 12 - Sql Server

I have the same proplem "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.)"

My connection is:

server=POS06\SQLEXPRESS; AttachDbFilename=C:...\Datas.mdf;Initial Catalog= Datas; User ID= sa; Pwd=12345; Connect Timeout=10;

But My SQL is POS06\MSQL2014

Change the connection string to

server=POS06\MSQL2014 ; AttachDbFilename=C:...\Datas.mdf;Initial Catalog= Datas; User ID= sa; Pwd=12345; Connect Timeout=10;

it worked.

Solution 13 - Sql Server

make sure that you have specified user in Security-> Logins, if no - add it and try again.

Solution 14 - Sql Server

Follow the other answer, and if it's still not working, restart your computer to effectively restart the SQL Server service on Windows.

Solution 15 - Sql Server

Always try to log in using those credentials with SQL Management Studio. This might reveal some more details that you don't get at runtime in your code. I had checked the SQL + Windows authentication, restarted the server but still no luck. After trying to log in using SQL Management, I got this prompt:

screenshot

Somehow the password had expired although the login was created just minutes before. Anyway, new password set, connection string updated and all's fine.

Solution 16 - Sql Server

In my case the database was restored and it already had the user used for the connection. I had to drop the user in the database and recreate the user-mapping for the login.

  1. Drop the user

    DROP USER [MyUser]
    

It might fail if the user owns any schemas. Those has to assigned to dbo before dropping the user. Get the schemas owned by the user using first query below and then alter the owner of those schemas using second query (HangFire is the schema obtained from previous query).

select * from information_schema.schemata where schema_owner = 'MyUser'
ALTER AUTHORIZATION ON SCHEMA::[HangFire] TO [dbo]     

2. Update user mapping for the user. In management studio go to Security-> Login -> Open the user -> Go to user mapping tab -> Enable the database and grant appropriate role.

Solution 17 - Sql Server

In my case: Assign a sysadmin role to the user.

  1. Login as windows authenticated user
  2. Go to: Security->Login->Right click user->Assign server role as sysadmin

Solution 18 - Sql Server

In my case, login works fine remotely, via VPN. But connecting from the server where sql server was installed, it failed.

Turns out, the instance name is not the default eg. SQLEXPRESS. Hence, it needs to be explictly specified when connecting.

enter image description here

enter image description here

Server name: .<instance_name> eg. ".\I01"

I don't have to do this if I'm connecting remotely, just ,

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionIter AtorView Question on Stackoverflow
Solution 1 - Sql ServerIter AtorView Answer on Stackoverflow
Solution 2 - Sql ServernzchrisView Answer on Stackoverflow
Solution 3 - Sql ServerNo NameView Answer on Stackoverflow
Solution 4 - Sql ServerJoe WaltersView Answer on Stackoverflow
Solution 5 - Sql ServerMohammad DehghanView Answer on Stackoverflow
Solution 6 - Sql ServerMuhammad BilalView Answer on Stackoverflow
Solution 7 - Sql ServergotorgView Answer on Stackoverflow
Solution 8 - Sql ServerGrocoView Answer on Stackoverflow
Solution 9 - Sql ServerBence VégertView Answer on Stackoverflow
Solution 10 - Sql ServerAnssssssView Answer on Stackoverflow
Solution 11 - Sql ServerStefanView Answer on Stackoverflow
Solution 12 - Sql ServerDoan bienView Answer on Stackoverflow
Solution 13 - Sql ServerelkooView Answer on Stackoverflow
Solution 14 - Sql ServercschaeferView Answer on Stackoverflow
Solution 15 - Sql ServerCyberDudeView Answer on Stackoverflow
Solution 16 - Sql ServerBagaView Answer on Stackoverflow
Solution 17 - Sql ServerRicardo D. Ferrancullo IIIView Answer on Stackoverflow
Solution 18 - Sql ServertinkerView Answer on Stackoverflow