Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Tracking / logging database changes

Author  Topic 

rj_khatri
Starting Member

13 Posts

Posted - 2006-04-12 : 10:38:42
Hi,

We are designing an application where in we are planning to do database auditing (logging the changes being made).

I want to know the best practices to do this.

Requirements are like following:
Whenever any update operation is done... changes (like last value, current value, Modification date and modified by) are to stored in a history table.

Question:
1. What would be the best strategy and design of database tables to store this data?
2. How to make it generic design for all the tables?

Should there be one history table for all the database tables or there must be history table for each table?

Could you please provide some insight on this issue in detail.

I'll appreciate for your efforts.

Thanks and regards,
Rajesh Khatri

Rajesh Khatri

nr
SQLTeam MVY

12543 Posts

Posted - 2006-04-12 : 11:23:06
see
http://www.nigelrivett.net/#Triggers

It depends on the system which is tyhe best option.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-04-12 : 11:27:27
"Should there be one history table for all the database tables or there must be history table for each table?"

I would dissuade you from the single table approach in the strongest possible terms!

See http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=Triggers+to+audit+changes

Kristen
Go to Top of Page

rj_khatri
Starting Member

13 Posts

Posted - 2006-04-14 : 07:13:36
Thanks Kristen & nr.
You guys have given a base to think over & evaluate.

Thanks again and regards,


Rajesh Khatri
Go to Top of Page
   

- Advertisement -