Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> OLD copy of record---AUDIT TRAIL--How To?

OLD copy of record---AUDIT TRAIL--How To?

From: NNOOR <Nnoor_at_cris.com>
Date: 1998/11/12
Message-ID: <72f98q$q25@journal.concentric.net>#1/1

We have the need to keep an audit trail of the data that exists in a few tables. That means making a copy of the record before any changes/deletes are commited.

Question: what is the best way to do it?

I thought of two ways to do it, both thru BEFORE UPDATE/DELETE triggers. One would save the "old" copy in the same table. Other method calls for inserting the changed/deleted record in a separate tableX_Change or tableX_Delete table. How would you do it? Also, when moving records in a trigger, you have access to "old" values. Is there any way to reference the ":old.*" values which don't require specifying each single column name in the "values" section of the insert SQL in trigger---that way I don't have to update the trigger if table structure ever changes!

Thanks very much for your help!!!

Regards,
nasir (nnoor_at_cris.com) Received on Thu Nov 12 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US