........... Track Changes Trigger [message #150547] |
Thu, 08 December 2005 06:41 |
orcl_dba
Messages: 84 Registered: March 2005
|
Member |
|
|
Problem is that we need to track the history that for a certain table which column is updated by whom.
part of code is shown below
Create of Replace trigger change
after update on table A
for each row
begin
if :old.column1<>:new.column1 then
insert into history(sequence.nextval,:old.column1,:new.column1,date)
end if;
there are 20-25 columns and for all of them one has to write this code, to check each one of them.
Does this effect performance? anybody with a better solution. I have tried using workspace manager but it shows a compelete row and user name, even if user has changed only onel column and doesnt show prerly that which column is actually changed by the user. One needs to write additional code to extract this information out.
Kindly suggest/correct the design i will be thankful to you .
Best Regards..
|
|
|
|
|
Re: ........... Track Changes Trigger [message #150557 is a reply to message #150547] |
Thu, 08 December 2005 07:07 |
orcl_dba
Messages: 84 Registered: March 2005
|
Member |
|
|
i would like to let you know that Auditing affects the performance more than triggers.
The reason is that wheneve user logs out , the oracle server starts gathering stats as to what DML user has performed.
Triggers are better Approach, but may b anybody can make my desing better.
and secondly , when updating,, i dont feel like it will work
thnx for the reply at least...
Thankyou Verymuch,
|
|
|
|