How to tell if data has been changed directly in the table

  • Guys & Girls,

    I hope this is an easy question, but I can't seem to find the answer. I am developing an application, and as a security feature, I'd like to be able to tell if someone has changed the data in the DB by opening Management Studio, OPENing a table (right click, OPEN), and amending the data directly in the displayed results.

    Is this possible? I know that permissions / users / logins should tie down who can get into the DB, but I just wondered if this was possible / easy / feasible.

    Cheers for looking, hope someone can help!

    best regards to all

    Tim

  • Use audit triggers. There are many examples on the Internet. In your trigger you can capture the master..sysprocesses.program_name that is connected to the spid.

    Use the following to see what i mean:

    select * from master..sysprocesses where spid = @@spid (scroll over and look for the program_name column)

    Just be careful as audit triggers can significantly degrade performance based upon how much work they do.

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

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