How to Identify port number of SQL server

前端 未结 7 1545
天命终不由人
天命终不由人 2021-01-30 06:52

I Install SQL server in my system and I have to check on which port number SQL is working in my system

7条回答
  •  一个人的身影
    2021-01-30 07:12

    This query works for me:

    SELECT DISTINCT 
        local_tcp_port 
    FROM sys.dm_exec_connections 
    WHERE local_tcp_port IS NOT NULL 
    

提交回复
热议问题