BACK
TOP
SQL - Get IPClient from client that execute the query
Matías Creimerman - Buenos Aires, Argentina - 2012-06-05

To obtain the IP of the client that executes the current query you can execute the following line:

SELECT
client_net_address
FROM
sys.dm_exec_connections
WHERE
session_id = @@SPID;
This content is property of Matias Creimerman
Any misuse of this material will be punishable
This work is licensed under a
Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License
Creative Commons License