Submit a ticketCall us
Home > Success Center > Network Performance Monitor (NPM) > Exception: A network-related or instance-specific error while establishing a connection to SQL Server

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

Updated December 8th, 2016 

Overview

  • The following exception occurred on the platform when the connection with the DB was lost:

    Exception 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)
    Connection string - Data Source=*SQL SERVER NAME*;Initial Catalog=*DB NAME*_Prod;User ID=*DB USER NAME*;Password=*******;Connect Timeout=20;Load Balance Timeout=120;Application Name=SolarWinds.DataProcessor@domain-DataProcessorHost-0;Workstation ID=*MACHINE ID*


    There was not a DB incident during this incident.
     
  • Service was unable to open new database connection when requested.

Related errors

 

Environment

  • NPM all versions

Cause 

This error indicates that your physical server is not able to connect to SQL Server.

It is the most common error where your SQL Server is rejecting connection form Outside. You might have incorrect Credentials to access the SQL server therefore the Configuration wizard is failing to connect to the DB Server.

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)

 

Please consult your DBA before making any changes.

 

 

Resolution

Possible troubleshooting steps:

 

Verify that SQL Server and SQL Server Browser services are running

Make sure the SQL Server and SQL Server Browser services are running at all times on the server hosting your SQL instance.

The following screenshots are an example using SQL EXPRESS edition. The screenshots are a property of © 2016 Microsoft.

 

checking SQL service properties in Windows Services

checking SQL service startup type in Windows Services

starting SQL service in Windows Services

checking SQL service status in Windows Services

 

Turn off the Windows firewall on the SQL Server

  1. Check and disable Windows Firewall on the SQL Server.
  2. Check the firewall on Orion Server as well.

wf.JPG

 

Third-party database connectivity tools

You can also use third-party DB connectivity tools to check if you are able to reach out to SQL server.

 

To quickly test a database connection, try the Database Connection String / Command / SQL Tester Utility:

  • Quickly executes an sql command and displays the output in a grid.
  • Provides exception information to help troubleshoot connection issues.

 

Learn more:

 

Further troubleshooting steps for isolating the issue

Download details: Microsoft® SQL Server® 2008 Management Studio Express - Microsoft Download Center  (© 2016 Microsoft, available at https://www.microsoft.com, obtained on December 8, 2016.)

 

Once Done, follow the instructions in the following post. Make sure you are able to connect to SQL Server using SQL Studio.

How to enable remote connections in SQL Server 2008?

(© 2016 Microsoft, available at https://blogs.msdn.microsoft.com, obtained on January 16, 2017.)

 

 

Disclaimer: Please note, any content posted herein is provided as a suggestion or recommendation to you for your internal use. This is not part of the SolarWinds software or documentation that you purchased from SolarWinds, and the information set forth herein may come from third parties. Your organization should internally review and assess to what extent, if any, such custom scripts or recommendations will be incorporated into your environment.  You elect to use third party content at your own risk, and you will be solely responsible for the incorporation of the same, if any.

 

SUGGESTED TAGS: List below the tags you think should be added to make this article easy to find by a user.  Include product, version/release (if it only applies to specifics releases etc. 

 

Last modified

Tags

Classifications

Public