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

后端 未结 6 1825
感动是毒
感动是毒 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:58

    it needs just single line of code

     SELECT CONVERT(char(15), CONNECTIONPROPERTY('client_net_address'))
    

提交回复
热议问题