March 31, 2011 at 10:38 am
hello everybody
i was wondering if u guys can help me with creating a trigger that activiates when a certain IP/PC fires a DML
is there such a thing or is there a certain application that can do that?
many thanx in advance 🙂
March 31, 2011 at 10:57 am
SQL Server Profiler will monitor queries sent to the server.
It can certainly do user name filters, so maybe it will meet your needs.
---------------------------------------------
If data can screw you, it will; never assume the data are correct.
March 31, 2011 at 11:20 am
thank you very much but im actually preferring to hv a trigger to monitor bcoz we want to do it all the time 🙂
so its a long term plan bcoz we hv certains users we want to monitor them 🙂
March 31, 2011 at 12:00 pm
Test this T-SQL and modify it for the item(s) you require.
This will work in 2005 and 2008
SELECT * FROM sys.dm_exec_connections WHERE session_id <> 0
OR this which will ONLY work in 2008
SELECT CONNECTIONPROPERTY('client_net_address') AS client_net_address
March 31, 2011 at 12:19 pm
bitbucket-25253 (3/31/2011)
Test this T-SQL and modify it for the item(s) you require.This will work in 2005 and 2008
SELECT * FROM sys.dm_exec_connections WHERE session_id <> 0
OR this which will ONLY work in 2008
SELECT CONNECTIONPROPERTY('client_net_address') AS client_net_address
thank u very much mate 🙂
March 31, 2011 at 12:48 pm
aswani2002 (3/31/2011)
bitbucket-25253 (3/31/2011)
Test this T-SQL and modify it for the item(s) you require.This will work in 2005 and 2008
SELECT * FROM sys.dm_exec_connections WHERE session_id <> 0
OR this which will ONLY work in 2008
SELECT CONNECTIONPROPERTY('client_net_address') AS client_net_address
thank u very much mate 🙂
Your welcome. And when you do generate a trigger that does what you want it to do - please post it here on SSC - perhaps as a script so that others may learn what you have learned. This way as a community we all help each other.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply