获取IP

select client_net_address '客户端IP',local_net_address '服务器的IP' from sys.dm_exec_connections where Session_id=@@spid

你可能感兴趣的:(获取IP)