Friday, May 23, 2008
Auditing Enabling for the Standard Tables.
Most of the time we may asked to get the previous values stored in any seeded or custom tables for auiting purpose;
Eg. IF a PO is created with a Unit Price of $100 and then somebody updated to $120 then if you were asked to get the old value i.e $100.
We have to follow the below steps for enabling the audit for the table po_line_all for the column unit_price.
Oracle will create a table like po_lines_all_a internally and it will store all the audit records with the Primary key column and the auditing column and a sequence id;
For the above transaction this table contains two records
With transaction_type as ‘I’ (Insert) and unit_price column would be blank.
And transaction_type as ‘U’ (Update) and unit_price column would be 100. (The old value).
1)Goto System Administrtor->Audit Trail -> Tables -> Query for Define an Application User.let say you are suppose to do the audit on these tables.
PO_LINES_ALL
2)Add the columns whatever you want to audit.
3)Go to Audit Trail -> Groups ->
create a new group.
Enable the ‘Audit Setup Group’.
4)Run Audittrail Update Table.
Add the application user table under Audit Setup Group.
5)Run Audittrail Update Table.
6)Go to Audit Query Navigator ->Functional Groups-> Now you can see the Define an Application user table added under the audit setup
group.
7)If the table is available as per the step 6,Now run the Audit trail report,you will be able to get the audit information.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment