Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I cannot connect to [servername]

Information:
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 the instance nameis correct and that sql server is configured to allow remote connections (provider named pipes provider , error 40)


What's the solution?
Posted
Updated 6-Jan-11 21:34pm
v2
Comments
jerrykid 7-Jan-11 2:17am    
Please provide more about codes for connection to DB
zommarin 7-Jan-11 2:20am    
Please include your connection string. Also if using TCP/IP connections you may try to do a "ping" to the server address.
Dalek Dave 7-Jan-11 3:34am    
Edited for Grammar and Readability.

It might be surface area configuration error or sql service configuration issue.

Have a look at this thread for potential reasons and resolutions: Resolving A network-related or instance-specific error occurred while establishing a connection to SQL Server[^]
If needed, See steps for setting up Surface area configuration here..

If this does not resolve your issue, have a look at these thread:
http://forums.asp.net/t/1334649.aspx[^]
SQL SERVER FIX ERROR (provider: Named Pipes [^]
Quite few possible reasons and resolutions are proposed here too.
 
Share this answer
 
Comments
Hiren solanki 7-Jan-11 2:23am    
Sandeep you beat me to it.
Dalek Dave 7-Jan-11 3:35am    
Good Call!
thatraja 7-Jan-11 13:46pm    
Good answer
That's problem coming many times while connection to sql.

HERE[^] is a very good solution for concentrating for that problem only.
 
Share this answer
 
Comments
Dalek Dave 7-Jan-11 3:35am    
Good Links.

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900