4 Easy Steps to Fix: Unable to Determine the TCP Port Number Used by Microsoft SQL Server in Plesk

Encountering the error message “Unable to determine the TCP port number used by Microsoft SQL Server” in Plesk can prevent you from connecting to your database. This issue is common on RDP servers running Plesk with Microsoft SQL Server.

The primary cause of this problem is that Microsoft SQL Server is not configured to use a static port. When the SQL Server is set to use dynamic ports, Plesk cannot consistently detect the correct TCP port number, leading to connectivity issues.

In this guide, we will walk through how to resolve this issue by assigning a static TCP port to Microsoft SQL Server.

Causes of the Issue

There are several reasons why Plesk fails to determine the TCP port number of your Microsoft SQL Server:

  • Dynamic Ports: The SQL Server is configured to use dynamic ports, which change periodically.
  • SQL Server Browser Service Not Running: If the SQL Server Browser service is stopped, Plesk cannot detect the correct port.
  • Firewall Restrictions: The necessary TCP port is blocked by a firewall.
  • Incorrect Network Configuration: The SQL Server instance may not be properly set up to listen on TCP/IP.

How To Resolve The Issue

1. Check the Current SQL Server Configuration

For example if you are facing issue with MSSQLSERVER2019, verify whether your SQL Server is using dynamic or static ports, follow these steps:

1. Log in to the RDP Server
Open Remote Desktop Connection (RDP) and connect to your server.

2. Open SQL Server Configuration Manager
Press Win + R, type SQLServerManager15.msc, and press Enter.

3. Check TCP/IP Protocol

In SQL Server Configuration Manager, navigate to:

SQL Server Network Configuration > Protocols for MSSQLSERVER2019
Protocols for MSSQLSERVER2019

-> Make sure TCP/IP is enabled. If it is disabled, it might be causing the warning “Unable to determine the TCP port number used by Microsoft SQL Server”

3. View the Port Settings

-> Double-click TCP/IP and go to the IP Addresses tab.

-> Scroll down to IPAll and check.

Unable to determine the TCP port number used by Microsoft SQL Server

TCP Dynamic Ports: If it has a value (e.g., 49152), your server is not using dynamic ports.
TCP Port: If empty, a static port is not set. This will cause the error “Unable to determine the TCP port number used by Microsoft SQL Server” while connecting the database .

2. Configure a Static TCP Port for SQL Server

To resolve the issue “Unable to determine the TCP port number used by Microsoft SQL Server”, set a static TCP port for your SQL Server instance:

1.Disable Dynamic Ports and Assign a Static Port

2. In the TCP Port field, enter a static port, such as 1433 (default SQL Server port). If port 1433 is already being used by another SQL Server instance, you should assign a different static port to avoid conflicts.

Disable Dynamic Ports and Assign a Static Port

3. Apply Changes. Click OK to save the settings.

4. Restart SQL Server

Restart SQL Server

-> Go back to SQL Server Services in the Configuration Manager.
-> Right-click SQL Server (MSSQLSERVER) and select Restart.

3: Ensure SQL Server Browser Service is Running

If your SQL Server is using named instances, the SQL Server Browser service must be running.

  1. In SQL Server Configuration Manager, go to:
SQL Server Services > SQL Server Browser
SQL Server Browser

2. If SQL Server Browser is not running, right-click SQL Server Browser and select Properties.

3. Set Startup Type to Automatic and click OK.

4. Start the service by right-clicking SQL Server Browser and selecting Start.

4: Allow the SQL Server Port in Windows Firewall

To ensure SQL Server is accessible, allow the static port 1434 in the firewall:

  1. Open Windows Defender Firewall (wf.msc).
  2. Click Inbound Rules > New Rule.
  3. Select Port and click Next.
  4. Choose TCP and enter 1433 under Specific local ports.
  5. Allow the connection and apply to Domain, Private, and Public networks.
  6. Click Finish.

Repeat the same process for Outbound Rules.

Verify Plesk Connection to SQL Server

After configuring a static port, update the settings in Plesk:

  1. Log in to Plesk.
  2. Navigate to Tools & Settings > Database Servers.
  3. Click on your Microsoft SQL Server instance. Here MSSQLSERVER2019 .
  4. Update the port field to include the port number:
  5. Click OK and check if the warning message “Unable to determine the TCP port number used by Microsoft SQL Server” disappears.

Conclusion

The error “Unable to determine the TCP port number used by Microsoft SQL Server” in Plesk usually occurs due to dynamic ports. By assigning a static port, enabling the SQL Server Browser service, and configuring the firewall, you can ensure Plesk detects and connects to SQL Server without any issues.

If you’re looking for a reliable and hassle-free Plesk hosting solution, Veeble’s Plesk Shared Hosting is the perfect choice. With 24/7 expert support, automatic backups, and optimized server performance, Veeble provide a seamless hosting experience for your websites and applications.

Get started with Veeble’s Plesk Shared Hosting today!

Scroll to Top