Submit a ticketCall us

Don’t fall victim to a ransomware attack
Backups are helpful, but sometimes that’s not enough to protect your business against ransomware. At our live webcast we will discuss how to protect against ransomware attacks with SolarWinds® Patch Manager and how to leverage log data to detect ransomware. Register now for our live webcast.

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:
  • Service was unable to open new database connection when requested.
    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. 

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:

  • Check and disable Windows Firewall on the SQL server

 

  • 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

Use the following items to isolate 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.)

 

  • Try turning off the Windows Firewall on SQL Server and check the FW on Orion Server as well.

    wf.JPG

  • You can also use the below 3rd party DB connectivity tools to check if you are able to reach out to SQL server.

If you want to quickly test a database connection, try the Database Connection String / Command / SQL Tester Utility:

  • You can also use this to quickly execute sql command and see the output in a grid.
  • Provides exception information to help troubleshoot connection issues.

 

Database Connection String ; Command; Sql Tester - Home  (© 2016 Microsoft, available at http://dbaccesstesterclient.codeplex.com/, obtained on December 8, 2016.)

 

QUICK DATABASE CONNECTIVITY TESTING

(©2006-2017 SQLblog.comTM, available at http://sqlblog.com/, obtained on January 16th, 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.

 

Last modified
05:05, 20 Apr 2017

Tags

Classifications

Public