 |
|
Oracle Tips by Burleson |
Oracle 10g LOGMINER
Oracle LogMiner is a powerful utility that
queries the online and archived redo log files through the SQL
interface. The redo log files record any change made to any table in
the database. If the database is in archive mode (recommended) the
Redo Files are archived into ‘archived redo files’. LogMiner can now
mine (extract) information about these database changes and present
them as SQL statements to undo or redo the change. It is a good aid
when auditing or analyzing the historical activities or tasks of the
database.
Before we go on to examine the new features
introduced in Oracle Database 10g, let us recap the process involved
in the LogMiner activity.
The LogMiner operations are conducted using the
dbms_logmnr and dbms_logmnr_d PL/SQL package procedures. Data of interest is retrieved using the v$logmnr_contents view. The main steps are
as follows:
-
First, ensure that supplemental logging is
on. LogMiner requires that you enable supplemental logging prior
to starting the LogMiner session.
-
Specify a LogMiner dictionary. Either use
the dbms_logmnr_d.build procedure or specify the dictionary when
you start the LogMiner process, depending on the type of
dictionary you plan to use.
-
Specify a list of redo and archive log
files for analysis. For this, use the dbms_logmnr.add_logfiles
procedure, or direct LogMiner to create a list of log files for
analysis automatically when you start LogMiner.
-
Then start the LogMiner session by using
the start_logmnr procedure.
-
Now, request the redo data of interest. For
this, query the v$logmnr_contents view.
-
End the LogMiner session by using the
end_logmnr procedure of dbms_logmnr_d.
There are many new features within Database 10g
that ease LogMiner administration and execution. Let us look at
these features next.
Get the complete Oracle10g story:
To get the code instantly, click here:
Need an Oracle Mentor?
BEI is now offering personal mentors for Oracle DBAs where you can have an
Oracle expert right at your fingertips, anytime day or night. We work with
hundreds of Oracle databases every year, so we know exactly how to quickly
assist you with any Oracle question.
Why risk an unplanned outage? You can now get telephone access to Don
Burleson or any of his Oracle Certified DBAs with more than 20 years of
full-time IT experience. Click here for details:
http://www.dba-oracle.com/service_oracle_backup.htm

|