Skip to main content

How to Troubleshoot a Microsoft SQL Server Network or Instance-Specific Connection Error

This article helps you identify and resolve connection issues between your application and a Microsoft SQL Server database. This guide is intended for customers who are experiencing network-level connectivity problems or instance-specific errors when...

This article helps you identify and resolve connection issues between your application and a Microsoft SQL Server database. This guide is intended for customers who are experiencing network-level connectivity problems or instance-specific errors when attempting to connect to a Microsoft SQL Server.

Before you begin

You will need:

  • Access to the application or client tool attempting to connect to the database.

  • The correct server address (IP address or hostname) and port number.

  • The specific error message or code provided by the application.

Check the network connection to the server

Before troubleshooting the database configuration, verify that the server is reachable over the network.

  1. Open a command prompt or terminal on the machine where the application is running.

  2. Use the ping command to check connectivity to the server's IP address or hostname.

    ping 192.0.2.10

  3. If the ping fails, the server may be offline, the IP address may be incorrect, or a firewall may be blocking ICMP traffic.

  4. If the ping succeeds, proceed to the next step to check the specific port.

Check the specific port and instance

Even if a server is reachable, the specific port used by Microsoft SQL Server may be blocked or the instance may not be active.

  1. Use the telnet or Test-NetConnection command to check if the SQL Server port (default is 1433) is open.

    • Windows (PowerShell):

      Test-NetConnection 192.0.2.10 -Port 1433

    • Linux/macOS/Windows (Telnet):

      telnet 192.0.2.10 1433

  2. If the connection fails, the port is likely blocked by a firewall or the SQL Server service is not running on that port.

  3. If you are using a named instance (e.g., ServerName\InstanceName), ensure the SQL Browser service is running on the host server to resolve the correct port.

Verify the connection string and credentials

If the network and port are confirmed open, the issue may lie in the configuration of the application's connection string.

  1. Review the connection string in your application's configuration file.

  2. Ensure the server name is correct. If using a named instance, ensure the format is ServerName\InstanceName.

  3. Verify that the port number is included if it is not the default 1433.

  4. Confirm that the username and password provided in the connection string are correct and have the necessary permissions to access the specific database.

Check for local firewall or antivirus interference

Local security software on the client machine can sometimes block outgoing connections to specific ports.

  1. Temporarily disable the local firewall or antivirus software to see if the connection is established.

  2. If the connection succeeds while the software is disabled, add an exception for the SQL Server IP address and port.

Contact Hostek support

If you have confirmed that the server is reachable, the port is open, and your credentials are correct, but you still cannot connect, the issue may involve specific internal permissions or network routing.

Provide the following information to Hostek support:

  • The full error message or code.

  • The IP address or hostname of the SQL Server.

  • The port number you are attempting to connect to.

  • The specific application or tool you are using to connect.

Did this answer your question?