I wish to create a changes log for many of my tables in a MS SQL 2005 DB.
I will shortly be allowing our 26 shops access to our main database. They will be able to edit data. Because of this I need a simple log of what they change! I would like to record to a single table the following data:
Table Name, ID of Record Changed, Field Changed, Old Value, New Value, Date/Time, User.
I will then display this information to Managers & Supervisors in a simple Access DB form so we can see what they are actually doing.
Has anyone got an example of the code I require. I'm a relative beginer with SQL so a simple Copy/Paste solution would be great!
I've seen various ways of doing this type of thing but could really do with
http://www.codeproject.com/KB/database/AuditTrailGenerator.aspx
http://www.setfocus.com/technicalarticles/sql-server-2005-tsql.aspx
http://searchsqlserver.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid87_gci1186292,00.html