THE SQL Server Blog Spot on the Web

Welcome to - The SQL Server blog spot on the web Sign in | |
in Search

Paul Nielsen

AutoAudit 1.10c

AutoAudit is a free SQL Server (2005, 2008) Code-Gen utility that creates Audit Trail Triggers with:

·         Created, Modified, and RowVersion (incrementing INT) columns to table

·         Creates View to reconstruct deleted rows

·         Creates UDF to reconstruct Row History

·         Schema Audit Trigger to track schema changes

·         Re-code-gens triggers when Alter Table changes the table


Version 1.10c Adds:

·       Createdby and ModifiedBy columns. Pass the user to the column and AutoAudit records that username instead of the Suser_Sname value – useful for apps that manage their own users and connect using a common service account.

·         Records user’s batch that caused the change event.

·         Handles various data types better.

·         Includes several small bug fixes.


*   CodePlex link:

initial 2007 AutoAudit blog post:


Published Wednesday, March 17, 2010 10:16 PM by Paul Nielsen

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS



Calvin Jones said:

1. In the section "build _RowHistory Table-Valued UDF", the EXEC (@SQL) statement is commented out.

2. Procedure pAutoAuditDrop does not drop the Views and Table-Valued Functions.

March 19, 2010 12:15 PM

Rudy Hinojosa said:

I've revised the original 1.03 version to work with up to 5 composite keys.  If you are interested in this, shoot me an email at

July 15, 2010 6:20 PM

Leave a Comment


About Paul Nielsen

Paul Nielsen believes SQL is the romance language of data. As such he’s a hands-on database developer, Microsoft SQL Server MVP, trainer, and author of SQL Server Bible series (Wiley). As a data architect, he developed the concepts of Smart Database Design and Nordic – an open source O/R dbms for SQL Server. He lives in Colorado Springs.

This Blog



news item test
Privacy Statement