Skip to main content
InSource Solutions

TN - 1129 Resolving Logger messages, “A network-related or instance-specific error occurred while establishing a connection to SQL Server.”

Description

 

This article from InSource shows how to resolve Aveva Logger messages, "“A network-related or instance-specific error occurred while establishing a connection to SQL Server.”

  • Author: Peter Farrell
  • Published: 3/25/2021
  • Applies to: Historian Client all versions

Details

Typically, the full message will be -

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).The network path was not found.

 

Other than the message, everything appears to be working fine. To resolve, take a look at the following steps.

First check to ensure that you can ping the SQL Server for the machine running Historian Client trend or Query?  This will probably be OK, but make sure.

You need to make sure that Named Pipes and TCP are both enabled for SQL Server.

On the SQL Server/Historian machine click on Start and navigate to Microsoft SQL Server 2017 > SQL Server 2017 Configuration Manager

When SQL Server Configuration Manager opens, look for SQL Server Network Configuration and expand that leaf.  Click on Protocols for MSSQLSERVER.

Check and make sure all three and particularly Named Pipes and TCP/IP are enabled (see following screen shot).

xxxxx_00A.png

 

If Named Pipes is enabled, you should next check the configuration.  Right-click on Named Pipes and choose Properties.

 

xxxxx_00B.png

 

Confirm that the Pipe Name is configured as \\.\pipe\sql\query

 

xxxxx_00C.png

Close out of Configuration Manager and check the Logger to see if you are still seeing those messages.
 

If the messages persist in the Logger then you should next check to ensure that remote connections are allowed in SQL Server.

Open Microsoft SQL Server Management Console and right-click on the server root name at the top of Object Explorer (see screen shot below)
 

xxxxx_00D.png

 

Confirm that the “Allow remote connections to this server” check box is checked.  If not, check it (see screen shot below).


xxxxx_00E.png

 

Check the Aveva Logger to confirm that the messages have stopped.