I would like to tool that when record data changed inside all tables. so later i would get a report like
table user
added record - 3,user3..
deleted record - 2,user2..
|
I would like to tool that when record data changed inside all tables. so later i would get a report like table user added record - 3,user3.. deleted record - 2,user2.. |
||||
|
|
|
This solution does not require triggers but requires setup and causes a performance hit if you enable it for all tables. Auditing has been built into Oracle for many releases. There is an article here which goes into some detail. Basically, you turn it on, tune it for what level of detail you want and the output is available as a dba view or as XML. Check the system parameter AUDIT TRAIL, it sounds like you want the fine grained auditing available from 9i onwards so you can access the SQL_BIND and SQL_TEXT. There is an SCN number so you can flashback to the state of the data when the change was made. Keep in mind that there is a performance hit for all this. You must have the hardware and resources available if this is a production system. |
|||
|
|
|
You can use Oracle Logminer for this. This is a powerful tool to parse the redo logs. Check out Quoting an example from there:
|
|||
|
|
|
You can utilize DML triggers to do this exact task. This will be an AFTER trigger and you can insert the audited data in a separate audit table. EDIT: is there a reason why you want to audit ALL tables in the database? Usually there are just a handful of tables where you need to audit what has changed in them. |
|||||
|