Auditing database source code changes

Posted by John Paul Cook on SQL Blog See other posts from SQL Blog or by John Paul Cook
Published on Mon, 12 Apr 2010 20:41:00 GMT Indexed on 2010/04/12 21:34 UTC
Read the original article Hit count: 326

Filed under:
Auditing changes to database source code can be easily implemented with a database trigger. Here’s a simple implementation of stored procedure auditing using an audit table and a database trigger. It assumes that a schema named Audit already exists. CREATE TABLE Audit . AuditStoredProcedures ( DatabaseName sysname , ObjectName sysname , LoginName sysname , ChangeDate datetime , EventType sysname , EventDataXml xml ); Notice the EventDataXml column. Using an nvarchar column to store the source text...(read more)

© SQL Blog or respective owner