Unable to determine the TCP port number used by Microsoft SQL server ‘.\MSSQLSERVER2016
-
Open SQL Server Configuration Manager:
- Press
Windows Key + Rto open the Run dialog. - Type
SQLServerManager13.msc(for SQL Server 2016) and press Enter.
- Press
-
Enable TCP/IP Protocol:
- In SQL Server Configuration Manager, expand
SQL Server Network Configuration. - Click on
Protocols for MSSQLSERVER2016(or the name of your specific instance). - In the right pane, right-click on
TCP/IPand selectEnableif it’s not already enabled. - Configure a Fixed TCP Port:
- Right-click on
TCP/IPand selectProperties. - Go to the
IP Addressestab. - Scroll down to the
IPAllsection. - In the
TCP Dynamic Portsfield, ensure it is empty. If it contains0, delete it. - In the
TCP Portfield, enter a specific port number (e.g.,1433, which is the default SQL Server port). Ensure this port is not in use by another application. - Click
OK.
- Right-click on
- In SQL Server Configuration Manager, expand
-
-
Restart SQL Server Service:
- In SQL Server Configuration Manager, go to
SQL Server Services. - Right-click on
SQL Server (MSSQLSERVER2016)and selectRestart.
- In SQL Server Configuration Manager, go to
-
Configure Windows Firewall:
- Open
Windows Firewall with Advanced Security. - Create a new Inbound Rule to allow connections on the TCP port you configured (e.g.,
1433) for the SQL Server executable (sqlservr.exe).
- Open
