Use the script below to find the tcp port number that the SQL Server is listening on.
SELECT local_tcp_port FROM sys.dm_exec_connections WHERE session_id = @@SPID GO
Use the script below to find the tcp port number that the SQL Server is listening on.
SELECT local_tcp_port FROM sys.dm_exec_connections WHERE session_id = @@SPID GO