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.
![Bg065](https://bonguides-1e199.kxcdn.com/wp-content/uploads/2022/05/bg065.png)
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.
![Bg080](https://bonguides-1e199.kxcdn.com/wp-content/uploads/2022/05/bg080.png)
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.
![Bg065](https://bonguides-1e199.kxcdn.com/wp-content/uploads/2022/05/bg065.png)
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.
![Bg081](https://bonguides-1e199.kxcdn.com/wp-content/uploads/2022/05/bg081.png)
3. Restart the SQL Server services.
![Bg082](https://bonguides-1e199.kxcdn.com/wp-content/uploads/2022/05/bg082.png)
Connect to SQL Server using static port
4. Now, using SSMS to connect to the SQL Server using static port.
sqlservername,port_number
![Bg083](https://bonguides-1e199.kxcdn.com/wp-content/uploads/2022/05/bg083.png)
Connect to a SQL instance with custom static port.
sqlservername\instance,port_number
![Bg085](https://bonguides-1e199.kxcdn.com/wp-content/uploads/2022/05/bg085.png)
![Bg084](https://bonguides-1e199.kxcdn.com/wp-content/uploads/2022/05/bg084.png)