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

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

When you are trying to connect to a SQL Server using Microsoft SQL Server Management Studio, you may see the following message:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessbile. Verify that the instance name is correct and that the SQL Server is configured to allow remote connections. (provided: Named Pipes Provider, error: 40- Could not open a connection to the SQL Server) (Microsoft SQL Server, Error: 2).

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessbile. Verify that the instance name is correct and that the SQL Server is configured to allow remote connections. (provided: Named Pipes Provider, error: 40- Could not open a connection to the SQL Server) (Microsoft SQL Server, Error: 2)

While the message tells you to check some of the items that can cause this issue, it fails to mention that if your SQL Server Service is not started, then you cannot connect. One of the first things that you should check is that the SQL Server (MSSQLSERVER) is started. You can go to the Services Console (services.msc) and look for SQL Server (MSSQLSERVER) to see that it is started. If not, then start the service.

You could also do this through an elevated command prompt by typing net start mssqlserver.

If the service is started and you still cannot connect, you should check all the connection points. For detailed steps on troubleshooting this issue, see Resolving SQL Connection Errors Step-by-Step by Pinal Dave.

Additional Resources

SQL Events and Errors
 

Leave a Comment
  • Please add 5 and 5 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
Comments
  • Ed Price - MSFT edited Revision 8. Comment: Fixed fake link

  • Ed Price - MSFT edited Revision 5. Comment: Title update (for clarity). Adding tags

  • Kurt Hudson MSFT edited Revision 3. Comment: Retitled the article that Pinal Dave wrote, so that people might actually look at it.

  • Kurt Hudson MSFT edited Revision 2. Comment: Added a link to a very descriptive blog posting about this error - complete with screen shots

  • Kurt Hudson MSFT edited Revision 1. Comment: Added Events and Errors link

  • Kurt Hudson MSFT edited Original. Comment: Updated with the application name that produces this error message

Page 1 of 1 (6 items)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
Page 1 of 1 (10 items)