查询当前Connection使用的协议(Named Pipe or TCPIP)

SELECT

ConnectionProperty('net_transport') AS 'Net transport',

ConnectionProperty('protocol_type') AS 'Protocol type'

 

SELECTnet_transport,protocol_type,local_net_address,client_net_address

FROM SYS.dm_exec_connections

WHERE session_id= @@SPID

 

结果如下:

 

你可能感兴趣的:(session)