Get port-number for MSSQL-server

To get the port number used by your MSSQL-server, you can use the command below.

SELECT local_tcp_port

FROM   sys.dm_exec_connections

WHERE  session_id = @@SPID

GO

 

Leave a Reply

Your email address will not be published. Required fields are marked *