any trigger to monitor certain PCs\IPs DML?

  • 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 🙂

  • 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.

  • 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 🙂

  • 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

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • 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 🙂

  • 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.

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply