SELECT Connectionproperty('local_net_address') AS "IP Address",
Serverproperty('ComputerNamePhysicalNetBIOS') "Machine Name"
-- Client and Server Ip Address and Mahine name
SELECT Serverproperty('ComputerNamePhysicalNetBIOS') "Machine Name",
local_net_address AS "Server IP Address",
client_net_address AS "Client IP Address"
FROM SYS.DM_EXEC_CONNECTIONS
WHERE SESSION_ID = @@SPID
No comments:
Post a Comment