Professional Documents
Culture Documents
What Is An AuditTrail
What Is An AuditTrail
An AuditTrail is one of functionality for retaining a history of changes to data. What ,who
and when can be identified on a particular table or column if the functionality is enabled.
When you enter or update data in your forms, you change the database tables underlying
those forms. An audit trail tracks which row in the database was updated at what time,
and which user was logged in using the associated form(s).
If you are seeking auditing ability to track changes on a particular table of Oracle this
post might helpful to you.
You can turn AuditTrail on or off (Yes or No). Normally the default setting is No (Off).
When you enter or update data in your forms, you change the database tables underlying
the forms you see and use. AuditTrail tracks which rows in a database table(s) were
updated at what time and which user was logged in using the form(s). Also..
Several updates can be tracked, establishing a trail of audit data that documents
the database table changes.
AuditTrail is a feature enabled on a form-by-form basis by a developer using
Oracle's Application Object Library.
All the forms that support AuditTrail are referred to as an audit set. You should
also note not all forms may be enabled to support AuditTrail.
To enable or disable AuditTrail for a particular form, you need access to Oracle
Application Object Library's Application Developer responsibility.
Users cannot see nor change this profile option.
This profile option is visible and updatable at the site and application levels.
Setting Up AuditTrail(>11i )
You can choose to store and retrieve a history of all changes users make on a given table.
Auditing is accomplished using audit groups, which functionally group tables to be
audited. For a table to be audited, it must be included in an enabled audit group.
The steps for setting up AuditTrail include:
This is very very important.These are groups of tables and columns, where you do not
necessarily need to include all the columns in a given table. You enable auditing for audit
groups rather than for individual tables. You would typically group together those tables
that belong to the same business process (for example, purchase order tables see at the
end).
A given table can belong to more than one audit group. If so, the table is audited
according to the highest "state" of enabling for any of its groups, where Enabled is the
highest, followed by Disable Dump Data, Disable No Growth, and Disable Purge Table,
in that order.
You choose the registered Oracle IDs at your site that you want to audit. This allows you
to audit across multiple application installations. When a table is added to an audit group,
auditing will automatically be enabled for all installations of the table for which audit is
enabled.
Your AuditTrail definitions (and auditing) do not take effect until you run the Audit Trail
Update Tables Report. If you change any of your definitions later, you must rerun this
program. You run the Audit Trail Update Tables Report from the standard submission
(Submit Reports) form.
This program creates database triggers on the tables in your audit groups for your
installations. It also creates shadow tables, one for each audited table, to contain the audit
information. If you have changed your audit definitions or disabled auditing for an audit
group, the program drops or modifies the auditing triggers and shadow tables
appropriately.
The program also builds special views you can use to retrieve your audit data for
reporting.
You can check SQL*Plus to see if the Shadow Tables have been created or not. Shadow
Table name is the same 26 Characters of the Table being audited followed by a suffix of
"_A" ,suffix of "_AI" for Insert Triggers, "_AU" for Update triggers , "_AD" for Delete
Triggers,suffix of "_AIP" for Insert Procedures "_AUP" for Update Procedures and
"_ADP" for Delete Procedures.
AuditTrail Limitations
PO_REQUISITION_HEADERS_ALL
PO_REQUISITION_LINES_ALL
PO_REQ_DISTRIBUTIONS_ALL
FND_AUDIT_COLUMNS
FND_AUDIT_GROUPS
FND_AUDIT_SCHEMAS
FND_AUDIT_TABLES
Client Dilema : HOW TO ENABLE AUDITING AT "FORMS" AND "USER"
LEVEL TOGETHER
Customer has set the profile "Sign-on: Audit Level" to FORMS to collect information
about the forms sessions at a particular time .
By default the value for this profile was USER. Since he has set the value to Forms can
he collect the User related information
As per the below example the 'Define An application user' is a user table name for
FND_USER,the same steps you can follow for your own tables.
1. Go to Audit Trail -> Tables -> Query for Define an Application User.let say you
are suppose to do the audit on these tables.
o PO_DISTRIBUTIONS_ALL
o PO_LINES_ALL
o PO_LINE_LOCATIONS_ALL
o PO_HEADERS_ALL
2. Add the columns whatever you want to audit.
3. Go to Audit Trail -> Groups -> Query for Audit Setup Group
4. Enable the 'Audit Setup Group'.
5. Run audittrail update table.
6. add the Define an application user table under Audit Setup Group.
7. Run the audit train update table again.
8. Go to Audit Query Navigator ->Functional Groups-> Now you can see the Define
an Application user table added under the audit setup
group.
9. If the table is available as per the step 8,Now run the Audit trail report,you will be
able to get the audit information.
The process remain same, as mention above. You should make sure that your
have used ad_dd package to create custom objects in Applications. and you have used
ad_dd.register_table to register table and ad_dd.register_column to register columns