Set the parameter
AUDIT_TRAIL = db,extended.
>How can this be done?
Change Data Capture
CDC is deprecated in 12c. Use "total recall"/flashback archiving/whatever-it-is-called.
The basic functionality of "total recall" is now part of 12c and (i believe) 126.96.36.199+
188.8.131.52 and before, it is part of the Advance Compression add-on (or a totally separate add on for ~11.1)
Message was edited by: MikeKutz added URL for Total Recall
I am using Oracle Database 11g Enterprise Edition
I am having a table inside my DB with the name Person, now i want to keep tack of all such records where person name was updated. For this i enable the Audit Trail but it only provides me information about the OS and User not about the data change. However in my case i need to keep information about the New and Old data along with OS and User Information.
How can this be done?
Write a trigger on the table that fires when the name column changes. In that trigger you can write the data changes to your own new log table.
As rp0428 said, I think the best option for you is to create a trigger and write the data changes to a new log table.
Why would a trigger, (which can be by-passed and prevents parallel DML), be better than Oracle's supported Flashback Archive technology?
It can't be cost because, with 184.108.40.206 and 12c, the cost is $0
Flashback technology is an option that could help to keep track records changed, but the OP also wants to record the OS and USER information.
Thanks. I see now.
I had something similar (ie 'who' mad the change).
My solution to the requirement: I just added a "modified by user" column to the tables that needed to be audited.
DELETEs would be my only concern...
I lucked out because those particular tables have a business rule of 'do not delete data'.
Maybe in future versions, Oracle could allow Flashback Archive to automagically track session state data also.
>>Maybe in future versions, Oracle could allow Flashback Archive to automagically track session state data also.
Who knows? Maybe in Oracle 12c R2 ;-)