How to get the client IP address from SQL Server 2008 itself?

后端 未结 6 1828
感动是毒
感动是毒 2020-12-05 02:11

I have a trigger for insert/update/delete. That is working fine. Also, I need the client\'s IP address from where the changes are made. That I need in T-SQL, that means, not

6条回答
  •  执笔经年
    2020-12-05 02:55

    You can try out this solution. It even works on shared hosting:

    select CONNECTIONPROPERTY('client_net_address') AS client_net_address 
    

提交回复
热议问题