How to determine the port number used by SQL Server and configure a static port

Table of Contents

 When attempting to connect to a specific SQL instance from a custom or third party software program, it is common that the port number used by that SQL Server instance be specified in the application.

Determine the TCP/IP port number of the instance of SQL Server

1. Click the Start button, then expand the SQL Server folder and launch SQL Server Configuration Manager.

How to determine the port number used by SQL Server and configure a static port

2. Expand SQL Server Network Configuration and highlight Protocols for. Double-click on TCP/IP in the right window | Click on the IP Addresses tab.

How to determine the port number used by SQL Server and configure a static port

Configure a static port number for SQL Server

 For certain situations it may be beneficial for the custom application to use a static port to connect to SQL. To configure a static port number:

1. Open SQL Server Configuration Manager and expand SQL Server Network Configuration.

How to determine the port number used by SQL Server and configure a static port

2. Expand Protocols for <instance name> and double-click TCP/IP. Select the IP Addresses tab and under IPALL, set the desired TCPPort then save the change.

This is an Alert

If a value of 0 in the TCP Dynamic Ports dialog box indicates the use of dynamic ports. Let delete it then set desired TCP Port.

How to determine the port number used by SQL Server and configure a static port

3. Restart the SQL Server services.

How to determine the port number used by SQL Server and configure a static port

Connect to SQL Server using static port

4. Now, using SSMS to connect to the SQL Server using static port.

sqlservername,port_number
How to determine the port number used by SQL Server and configure a static port

Connect to a SQL instance with custom static port.

sqlservernameinstance,port_number
How to determine the port number used by SQL Server and configure a static port
How to determine the port number used by SQL Server and configure a static port

Leave a Comment

Required fields are marked *