How to Identify port number of SQL server
- Open SQL Server Management Studio
- Connect to the database engine for which you need the port number
-
Run the below query against the database
select distinct local_net_address, local_tcp_port from sys.dm_exec_connections where local_net_address is not null
The above query shows the local IP as well as the listening Port number
-
Open Run in your system.
-
Type
%windir%\System32\cliconfg.exe
-
Click on ok button then check that the "TCP/IP Network Protocol Default Value Setup" pop-up is open.
-
Highlight TCP/IP under the Enabled protocols window.
-
Click the Properties button.
-
Enter the new port number, then click OK.
You can also use this query
USE MASTER
GO
xp_readerrorlog 0, 1, N'Server is listening on'
GO
Source : sqlauthority blog
Visually you can open "SQL Server Configuration Manager" and check properties of "Network Configuration":