AutoAudit script
Paul Nielsen
www.sqlserverbible.com
- Version 2.00h (beta) is available in the downloads tab. **
AutoAudit is a SQL Server (2005, 2008)
Code-Gen utility that creates Audit Trail Triggers with:
- Created, CreatedBy, Modified, ModifiedBy, and RowVersion (incrementing INT) columns to table
- Insert event logged to Audit table
- Updates old and new values logged to Audit table
- Delete logs all final values to the Audit tbale
- view to reconstruct deleted rows
- UDF to reconstruct Row History
- Schema Audit Trigger to track schema changes
- Re-code-gens triggers when Alter Table changes the table
Version two adds:
- Optional logging of submitted SQL Batch
- Optional Insert logging (none, event, all values)
- Optional strict or loose user context logging
- Optional base table DDL columns (Created, CreatedBy, Modified, ModifiedBy, and RowVersion)
initial AutoAudit blog post:
http://sqlblog.com/blogs/paul_nielsen/archive/2007/01/15/codegen-to-create-fixed-audit-trail-triggers.aspxScreenCast demo at:
http://www.screencast.com/t/kxnHkX9LN6Q