trigger for db audit purposes - newbie to the world of triggers

trigger for db audit purposes - newbie to the world of triggers

Post by Simon » Sat, 24 Nov 2001 01:35:00

Hi All

I use the following proc to try and track data deletions,
my question is how can I improve the imformation it returns as its useless !!!
DELETE    dbo  2001-11-22 16:20:03.473

I would prefer it to return information  such as the nt user name, or workstation ,anything that can identify the user who performed the action rather than the anonymous "dbo"

So any help appreciated

thanks then


*** Sent via Developersdex ***
Don't just participate in USENET...get rewarded for it!


trigger for db audit purposes - newbie to the world of triggers

Post by Umachandar Jayachandra » Sat, 24 Nov 2001 05:09:22

    Did you post the SP code? Anyway look at the system functions

Umachandar Jayachandran
SQL Resources at
( Please reply only to newsgroup. )


1. Instead of trigger for audit purposes


It's my understanding that instead of triggers are not really before
triggers but just as the name implies they are substitued for the action.
For an instead of update trigger two tables seem to be created one for
deletes and one for inserts.  We are trying to create an audit log of
changed fields in a table by using an instead of trigger.  The audit table
has all the same columns defined as the original table plus a modification
column.  The audit table also allows nulls on all columns.  We only want to
populate the audit table with the original values of columns that are being
modified and the modification date.   Without using cursors is there a way
to determine what columns are about to be modifed and insert the orignal
data into the audit table?


2. Look-up tables

3. Complete DB audit in After Trigger questions

4. VB5/DAO3.5 Install

5. Trigger Newbie... Help with Trigger

6. Need a sysmaster sql to find I/O meister.

7. Triggers, Triggers and more Triggers

8. How to displat the replication job commands ?

9. Need help with code on Auditing and Triggers

10. Dynamic trigger audit?

11. Easy Audit Trigger inserts two Before Update rows

12. Trigger and Audit Trails

13. Trigger-based audit logging to properly log old/new NULL