返回服务端客户端IP

SELECT CONNECTIONPROPERTY('local_net_address') AS 服务端IP地址,
       CONNECTIONPROPERTY('local_tcp_port') AS 服务端口,
       CONNECTIONPROPERTY('client_net_address') AS 客户端IP地址

参考:CONNECTIONPROPERTY