September 24, 2008 at 9:49 am
Hi
I have around 20 tables in DB and I need to log all transactions happening for all tables. One solution is to create a trigger for each table which we need to avoid. please let me know if there is some way using which I can do by writing a single trigger or proc.
Cheers
Siddarth
September 24, 2008 at 9:57 am
And what version of SQL server are you talking about? In SQL 2005 you can use C2 audit option, for example...
http://www.sqlservercentral.com/articles/Monitoring/basicsofc2auditing/1547/
September 24, 2008 at 10:06 am
we are using sql 2005
thanks for the link
September 24, 2008 at 10:12 am
I have gone through the link and came to know that it will log the details for all tables in DB. We do not need logging for all the tables, we need to have a facility to make the selection, please let me know if you have something catering to the same?
Cheers
SIDDARTH
September 24, 2008 at 10:22 am
I need to log all transactions happening for all tables
We do not need logging for all the tables
1. Please, make up your mind. 🙂
2. In SQL 2005 there is no such built in ability. In SQL 2008 - you can. Looks like, your only option is still with triggers.
September 24, 2008 at 10:33 am
If you are inserting, deleting and updateing via stored procedures , then you can modify these to insert data into the audit tables whenever they are called, i prefer this method over triggers.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply