Click here to Skip to main content
15,910,872 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)


--------------------
I have LAN setup with router connected with my two computers,one printer .I had also formatted my primary computer and clean installed SQL Server 2005 into it. Today, incidentally, I was sitting in my office trying to connect SQL Server located in server office system and suddenly I stumbled upon the following error.

-------------------
my server system work correctly but my local system not working..i tried
my local system start menu > run > cmd > <b>ping -a [servername]</b> execute this command but throw error --- <b>Ping request could not find host server please check the name and try angain</b>
Posted
Updated 7-Jun-10 23:54pm
v3
Comments
LittleYellowBird 8-Jun-10 5:24am    
I changed your title as it's best not to use capital letters too much, it looks like shouting and annoys people.

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 this thread:
http://forums.asp.net/t/1334649.aspx[^]
Quite few possible reasons and resolutions are proposed here too.
 
Share this answer
 
Hi,

Please make sure that two computer are connected using LAN/internet.
[ To check the connectivity use PING command in DOS.]

If you are sure that both are connected, and still you get the error make sure that SQL Server services are running in Server computer.
[ Go to services (windows start->run->type Services.msc-->list of Services appears --> find services named "SQL Server" and "SQL Server Agent"--> if these services are stopped then start these services. ]


If you still get the problem let us know.

Hope it helps you,
 
Share this answer
 
Comments
nilong 8-Jun-10 5:59am    
i tried my local system .. select start menu > press run > cmd
type command ping -a [servername]
execute command but erroe throw ping request could not find host server. please check the namd and try again
Arindam Tewary 8-Jun-10 6:51am    
Thats means you dont have a network connection between two computer, one from where you want to connect, another computer is where the SQL server resides. This is a network related issue. Make sure two computer is connected only then you can access sql server and connect to sql server.
nilong 8-Jun-10 6:58am    
now..how i do !!!please help me
Arindam Tewary 8-Jun-10 7:28am    
Please talk to your office local administrator/computer vendor so that they can set up a network/repair any fault in network.
nilong 8-Jun-10 7:44am    
thnx,,buddy

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