Log User activity

  • Hello,

    I have some mysterious row deletions from a table that I am trying to track down. I have written a trigger to rollback the deletion, but I am also writing the activity to another table.

    Is there a way in the trigger to know what is the login connected with the deletion?

    Thanks!

    John Gibson

  • You can use USER_NAME() and few other like this one (bol for details) to get the info about whose doing this stuff.

    Also might I suggest you put your code in the instead of delete trigger, so that you don't insert then rollback (less work for the server).

Viewing 2 posts - 1 through 2 (of 2 total)

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