So you have installed SQL Server on your server. Or maybe you installed SQL Server Express when we installed Visual Studio Express.
Your next step is to create a test web page that queries a database to test your new SQL Server and when you try to execute your code, you get an exception with the error below.
Or maybe you’re trying to connect to the SQL Server from SQL Server Management Studio when you receive the following error.
A transport-level error has occurred when sending the request to the server. (Provider: Shared Memory Provider, error: 0 – No process is on the other end of the pipe.)
Or you could receive this other error:
A transport-level error has occurred when sending the request to the server. (Provider: Shared Memory Provider, error: 0 – The pipe is being closed.)
Before you can connect to SQL Server, it’s necessary to enable certain protocols on the server side.
Go to Start Menu -> All Programs -> Microsoft SQL Server 2008 R2 -> Configuration Tools -> SQL Server Configuration Manager.
Expand the SQL Server Network Configuration node and click on Protocols for MSSQLSERVER/SQLEXPRESS.
Right-click on TCP/IP and select Enable.
You will get a warning saying that the changes won’t take effect until the service is restarted.
Click on OK.
Repeat this step for Named Pipes.
Now click on the SQL Server Services node.
Right-click on SQL Server (MSSQLSERVER/SQLEXPRESS) and select Restart.
That’s it. Try connecting to your SQL Server again. Leave a comment if you still can’t connect.