Click here to Skip to main content
15,900,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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: 2)


What do i must to do?
Posted

There are so many possible things it could be, that we can't really cover them here.

Have a look here: it covers the most popular 7 reasons: http://www.sswug.org/articlesection/default.aspx?TargetID=44331[^]

But it does miss one out: "Have you installed SqlServer somewhere you can actually get at it?" - I'd check that one first, if I was you! :laugh:
 
Share this answer
 
Comments
AlirezaDehqani 4-Oct-12 15:39pm    
ok. but i just installed visual studio 2010
OriginalGriff 4-Oct-12 15:46pm    
Installing VS2010 does not install SQL server! You need to go to the MS site and download it if you do not already have an instance you can use - the Express version is free. (If you are developing, my preference is to have a local SQL instance on my PC to prevent changes / damage going to anyone else. If you are working as a development team though, this may be impractical)
AlirezaDehqani 6-Oct-12 7:41am    
ok.i just installed visual studio 2010. so What is this => All Program => Microsoft SQl Server 2008
and SQLExpress is Running status in " SQL server Configuration management "
OriginalGriff 6-Oct-12 7:45am    
Start button => All Programs => Microsoft...
If you do not have SQL server installed, then it will not appear there, so ignore that one, or check ion teh machine you do have SQL server instyalled on.
AlirezaDehqani 6-Oct-12 7:58am    
okay. Thank you. my database project is running now. :)
Generally, it is 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..

Here, look at the following blog entries related to the same:
Under the default settings SQL Server does not allow remote connections[^]
It says:
I. Make sure that Remote Connections are enabled in Surface Area Configuration tool
II. Check Whether TCP/IP protocol is enabled in the SQL Server Configuration Manager
III. Make sure that SQL server Browser service is running
 
Share this answer
 
Generally, it is 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..

Here, look at the following blog entries related to the same:
Under the default settings SQL Server does not allow remote connections[^]
It says:
I. Make sure that Remote Connections are enabled in Surface Area Configuration tool
II. Check Whether TCP/IP protocol is enabled in the SQL Server Configuration Manager
III. Make sure that SQL server Browser service is running
 
Share this answer
 

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