By
Published: 03 May 2006
How do you write an audit trail trigger in SQL Server 2000? I want to keep track of inserts, deletes and updates of all of the tables in a particular database.
Writing a generic audit trail trigger in SQL Server can be a bit tricky, as it requires manipulation of a bitmask exposed by the COLUMNS_UPDATED function. You'll also need to figure out how to store disparate data types in some generic fashion, which might be difficult if your database uses TEXT, NTEXT, or IMAGE columns.
Luckily, SQL Server MVP Nigel Rivett has already done most of the work. You can find his audit trigger at Nigel's Web site.
Dig Deeper on Microsoft SQL Server Performance Monitoring and Tuning
SQL Server 2005 and T-SQL do have differences. The advantages and disadvantages would depend user environment as described by SQL Server 2005 expert...
Continue Reading
SQL Server expert Adam Machanic highlights the differences to consider when weighing the move to SQL Server 2005 Enterprise and Standard Edtions.
Continue Reading
SQL Server expert Adam Machanic's definition of a SQL Server instance.
Continue Reading