lundi 13 juillet 2015

SQL Server 2005 audit trail

What is the best approach to generate audit trail for transaction table in SQL Server 2005?

What is the relationship (if any) or link (if any) between these tables?

For example:

  1. I insert a row of data into sales_detail table. After that I insert a row into sales_detail_audit table.
  2. Next I made amendment to the same row in sales_detail table. I insert the particular record (before amendment) into sales_detail_audit table and then I update the sales_detail table.
  3. Therefore I have the latest data in the sales_detail table and the history of records in the sales_detail_audit table.

Am I doing it right?

Aucun commentaire:

Enregistrer un commentaire