Error: Could Not Connect to Server
Related Queries
- "We are moving Netwrix Auditor to a new domain/server and getting a connection error on DB restore."
- "We are migrating our Netwrix DB over to a new domain/server. Netwrix Auditor is installed on the new domain/server. SQL DB is coming from SQL 2019, new DB server is SQL 2022 and we are getting a connection error on the SQL listener."
Symptoms
When configuring the Audit Database settings in Netwrix Auditor, the following error message appears:
Could not connect to the 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)
Causes
Refer to the list of possible causes for the error:
- An incorrect SQL Server name is specified in the Audit Database settings.
- The SQL Server is not configured to allow remote connections.
- The SQL Server network protocols are disabled.
Resolutions
- Verify the SQL Server instance name specified in the Audit Database settings. Refer to the following article for additional information:Specifying the SQL Server Instance Name
- Configure your SQL Server instance to allow remote connections. Learn more in Microsoft's documentation: Configure remote access (server configuration option) — Use SQL Server Management Studio ⸱ Microsoft
- Enable the TCP/IP protocol in the SQL Server—refer to the following article for additional information: Enable TCP/IP Protocol in SQL Server
NOTE: Alternatively, review the TCP port used for SQL Server communication—learn more in Microsoft's documentation: Configure SQL Server to listen on a specific TCP port — Assign a TCP/IP port number to the SQL Server Database Engine ⸱ Microsoft. For additional information on setting a custom TCP port in Netwrix Auditor, refer to the following article: Specify Custom SQL Server Port for Netwrix Auditor Audit Database.
Related Articles
- Specifying the SQL Server Instance Name
- Configure remote access (server configuration option) — Use SQL Server Management Studio ⸱ Microsoft
- Enable TCP/IP Protocol in SQL Server
- Configure SQL Server to listen on a specific TCP port — Assign a TCP/IP port number to the SQL Server Database Engine ⸱ Microsoft
- Specify Custom SQL Server Port for Netwrix Auditor Audit Database