Você está na página 1de 3

Author A.

Kishore/Sachin
http://appsdba.info
AuditTrail in Oracle Applications
AuditTrail is a way of keeping track of changes made to important data
in Oracle Application tables. AuditTrail keeps a history of the following:
1. What changed?
2. Who changed it?
. When did the change take place?
This can be done on a row!by!row basis or on indi"idual columns of a
table.
Steps to Setup AuditTrail
#f we want to setup auditTrail$ then we need to follow the below
steps.
Step 1. %ogon to the Applications as the sysadmin user and select
the &ystem Administrator responsibility.
Step 2. 'ake sure A((%&)& has select pri"ileges on
&)&.*+A,TA+%-&.
.or e/ample$ if you are auditing the (A,(0O1-2T&,A%% table$
use the following &3% statement to "erify this:
select TA+%-,4A'- from &)&.*+A,TA+%-&
where TA+%-,4A'- like 5(A,(0O1-2T&,A%%56
Step 3. 4ow we need to de7ne auditgroups: #t is re8uired to group
the tables that we need to audit since auditing is enabled on
an audit groups basis.
Navigation: Security -> AuditTrail -> Groups
Step 4. 4ow de7ne audit installations: #n order to be able to audit
across application installations$ you must specify the Oracle
#*5s whose tables you wish to audit. At this point$ you will
need to specify the list of columns from the table you want
audited.
Navigation: Security -> AuditTrail -> nstall
Step !. 0un the 9AuditTrail :pdate Tables9 report from the submit
re8uest form to enable auditing.
1

Author A.Kishore/Sachin
http://appsdba.info
Navigation: "e#uests -> "un -> select a single re#uest
$%at does actually t%e &AuditTrail 'pdate Ta(les&
report do internally)
2reates shadow tables with a name of the 7rst 2;
characters of the audit table and a 9,A9 su</. The columns
will ha"e the same data types as those of the audited
table. The program also creates "iews ,A2= and ,A>= on
the shadow table to facilitate the access of data. The 9=9 in
the "iew name represents a number$ and can be any
number depending on how many "iews are needed to
access the data. The ,A2= "iew contains the current state
of the data at the time of 8uery from the ?oin of the shadow
table and the table audited. The ,A>= "iew contains the
same data as the shadow table plus the current "alue of
the rows. +asically$ the ,A2= "iew contains the current
status of the audited table with the unchanged columns
7lled!in with the unchanged "alues. The shadow table has
special columns in addition to the columns we speci7ed to
be audited:
A:*#T,T#'-&TA'(@*AT-A: Beeps track of date@CC:'#:&&A
and time when auditing was done.
A:*#T,T0A4&A2T#O4,T)(- @>A02CA02@1AA: This column
has the information of what type of transaction was
conducted on the table$ # for 9#4&-0T9$ : for 9:(*AT-9$ *
for 9*-%-T-9 or 2 for 92:00-4T9.
A:*#T,:&-0,4A'- @>A02CA02@1DDAA: The Oracle
Application :ser#* if changes are made from the forms or
Oracle #* if changes are made from &3%E(%:&.
A:*#T,T0:-,4:%%& @>A02CA02@2FDA: *elimited list of
column names that were changed from 4:%% actually.
A:*#T,&-&&#O4,#*@4:'+-0A: #* for the session.
A:*#T,2O''#T,#* @4:'+-0A: #* for the 2O''#T.
2

Author A.Kishore/Sachin
http://appsdba.info
(0#'A0) B-): The combined columns primary key "alue for
the table audited. This is not a special column but the
actual "alue of the primary key for the table.
2reates the after e"ent$ transaction le"el database
triggers on the tables in your audit group. *atabase
triggers can be created based on timing e"ents$ such as
9+-.O0-9 or 9A.T-09 a *ATA 'A4:(:%AT#O4
%A4G:AG- @*'%A acti"ity on the table. #n other words$ it
could be an 9#4&-0T9$ 9:(*AT-9 or 9*-%-T-9 acti"ity on
the table that could be the triggering e"ent that causes
the creation of a corresponding trigger. Triggers are
created either at a 90OW9 or 9T0A4&A2T#O49 le"el$
raising the total number of triggers that can be created
on a table to 12 @E2E2A. #t is this after e"ent transaction
type triggers that get created by the 9AuditTrail :pdate
Table9 report during this process. The names of these
triggers start with the 7rst 2; characters of the name of
the table being audited$ plus an ,A#$,A: or ,A*$ which
stand for after insert$ after update or after delete
triggers respecti"ely. These triggers call the procedures
,A#($,A:($ or ,A#* which are also created by this
program. These procedures sa"e the old data rows from
the audited table into the shadow table.
3

Você também pode gostar