The most widely distributed audit trigger for SQL Server complete with all the suggested changes from Stack Overflow.
I didn't write this code. I'm standing on the shoulder of giants. The code contained in this repo takes all suggested changes from Pop Rivett’s audit trail trigger.
When the audit code stopped working I found the following discussions:
- https://stackoverflow.com/questions/19737723/log-record-changes-in-sql-server-in-an-audit-table
- https://chat.stackexchange.com/transcript/message/34774768#34774768
I've taken all of the source code here and combined into a single repo for my use. Hopefully this will provide an easy copy/paste for others in the future.