A network-related or instance-specific error occurred while establishing a connection to SQL Server

Here we go again! You are trying to connect to your freshly installed sql server 2008 R2 express edition using localhost as server name and you are getting this error.

 

The purpose of this article is to let you know that the fix might be as simple as connecting to the name instance instead of localhost. When you install sql server using the web platform installer tools  , the sql server is installed as a named instance so it is likely to be ComputerName\SQLEXPRESS not localhost.

If you are trying unsure about the server name please use the browse feature of this pop up to locate your server instance or use the command
sqlcmd -L
at the dos prompt.

If you can connect to your named instance but unable to connect to it from a nother comouter on the network you might have some configurations or firewall related issues . In such cases this article below is what you need. 
http://blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/

Reference and Related Links

Open a port windows Firewall

http://windows.microsoft.com/en-US/windows7/Open-a-port-in-Windows-Firewall

http://windows.microsoft.com/en-US/windows-vista/Open-a-port-in-Windows-Firewall

Let's share thisShare on Facebook
Facebook
Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin

3 comments Write a comment