Click here to Skip to main content
15,886,787 members
Articles / Database Development / SQL Server / SQL Server 2008
Tip/Trick

Another reason for getting the error “A network-related or instance-specific error occurred while establishing a connection to SQL Server…” in MS SQL Server 2008

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
14 Nov 2012CPOL2 min read 22.9K   4  
Another way to solve the issue of “A network-related or instance-specific error occurred while establishing a connection to SQL Server…”

Introduction 

Normally the reason behind getting the error – “A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)” in MS SQL server 2008 is for not to enabling the TCP/IP protocol of MSSQLServer or SQLExpress. 

But today when I tried to run the software which database stored in another PC, couldn’t connect with the database at all. Then I checked the TCP/IP status is enabled or not from SQL Server configuration manager and I found that TCP/IP is already enabled for both the MSSQLServer and SQLExpress.
Solution:

Then after two hours doing so many things, I got the solution.

When I installed MS SQL server in server machine in that time there was no IP assigned in that server. But few days ago I assigned an IP on that server to include this machine into domain. Then I thought that may be this could be a problem and I did what I thought and It works. Now I will tell you how I solved it.

Step 1: Open SQL Server configuration manager from start > All Programs > Microsoft SQL Server 2008 > Configuration Tools.

Step 2: From SQL Server configuration manager window select Protocols for SQLExpress/Protocols for MSSQLSERVER (Which one you need) from left side tree menu. Then you will see all the protocols available in right side.

Step 3: From the available protocol right click on TCP/IP and click on properties. Then TCP/IP properties window will appear. Click on IP Addresses tab. Then set the IP address (IP Address that is assigned in SQL Server installed machine) into IP Address text box.

 

And the problem is solved. Provide a image of this window for your help.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Founder Codexplorer Technologies
Bangladesh Bangladesh
I am:
Founder & Technical Head at Codexplorer Technologies.
IT Consultant at Meridian Group.

I was:
Manager (IT) at Meridian Group.
Assistant Manager (Software Division) at KDS Garment Industries Limited.
Assistant Manager (Software Division) at E-Vision Software Limited.

My blog:
crea8ivecode

My preferred work area:
ASP.NET & SQL SERVER.

My email:
sadeque.sharif@yahoo.com

Follow me:
twitter | facebook | linkedin

Comments and Discussions

 
-- There are no messages in this forum --