Troubleshoot - "error": "A network-related or instance-specific error occurred while establishing a connection to SQL Server. Verify that the instance name is correct and that SQL Server is configured to allow remote connections"

Error experienced

"error": "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"

This KB applies to:

Applies to Versions

All

Applies to Source Connectors

Lansweeper on-prem

Applies to Destination Connectors

All

Error verification

No other error verification information is applicable.

Cause

This error may be caused by the below occurring:

  • The SQL Server isn't running on the expected default port.

Check the Database Port

  1. Login to SQL Server and open Sql Server Configuration Manager

    image-20230331-013136.png
  2. Expand SQL Server Network Configuration > TCP/IP and right click and choose Properties

    image-20230331-013645.png
  3. Click on IP Addresses tab and confirm the TCP Port being used.

    image-20230331-013842.png

If the port has been changed from the default of 1433 the new port will need to be reflected in the CI Sync Agent

  1. On the VM where CI Sync Agent is installed.

  2. Open the CI Sync Agent.

  3. Click the Source Systems tab.

  4. Double click the Lansweeper on-prem Source connection.

SQL error change port number 3.jpg
  1. In the SQL Server field.

  2. In the SQL Server field, after the name add a comma then the port number, e.g. ,1436

SQL error change port number 2.jpg


  1. Click Setup & Test.

  2. After a successful test has been completed, click the Save button.

  3. Perform a Sync to confirm the instance is all OK.

There are currently no related articles.

Control Information

Created

Reviewed

Data Classification

PUBLIC
Classified in accordance with the Syncfish Data Classification Framework