Professional Documents
Culture Documents
RDBMS
Benefits
Requirements
Source
Database:
The
database
that
produces all
the redo log
files that you
want Log
Miner to
analyze
Mining
Database:
The database
that Log
Miner uses
when it
performs the
analysis
Log Miner
Dictionary :
Provides
table and
column
names,
instead of
internal
object IDs
Redo Log
Files:
The Changes
made to the
database
Online Dictionary :
This is helpful when changes that has taken place very recently
and not archived yet.
Directs Log Miner to use the current online database dictionary
rather than a Log Miner dictionary contained in a flat file or in
the redo log files being analyzed.
EXECUTE DBMS_LOGMNR.START_LOGMNR(OPTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG);
Automatic Method:
Oracle Recommends Automatic Method
Manual Method :
The Log file which needs to be mined
Querying V$logmnr_contents
The archive redo log files are read sequentiallyuntil either the
filter criteria, such as End Time or end SCN, specified at startup
is met or the end of the archive log file is reached.
SQL> begin
dbms_logmnr.start_logmnr (
starttime => '07-May-2014 11:15:00',
endtime => '07-May-2014 11:17:00',
options => dbms_logmnr.dict_from_online_catalog +
dbms_logmnr.continuous_mine +
dbms_logmnr.print_pretty_sql
);
end;
/
PL/SQL procedure successfully completed.
SQL> begin
dbms_logmnr.start_logmnr (
startscn => '5502643',
endscn => '5503053',
options => dbms_logmnr.dict_from_online_catalog +
dbms_logmnr.continuous_mine +
dbms_logmnr.print_pretty_sql
);
end;
/
SQL>
SQL>
SQL>
SQL>
SQL>
SQL>
2
3
4
Select from the V$LOGMINER_CONTENTS view again. The output indicates that
corrupted blocks were skipped: CORRUPTED_BLOCKS is in the OPERATION
column, 1343 is in the STATUS column, and the number of corrupt blocks
skipped is in the INFO column.
V$logmnr_logs
Logminer Options
COMMITTED_DATA_ONLY:
If set, DML statements corresponding to committed transactions are returned.
DML statements corresponding to a committed transaction are grouped together.
Transactions are returned in their commit order. Transactions that are rolled back or
in-progress are filtered out
CONTINUOUS_MINE:
Directs LogMiner to automatically add redo log files, as needed, to find the data of
interest. You only need to specify the first log to start mining, or just the starting
SCN or date to indicate to LogMiner where to begin mining logs. You are not
required to specify any redo log files explicitly. LogMiner automatically adds and
mines the (archived and online) redo log files for the data of interest .
DICT_FROM_ONLINE_CATALOG:
Directs LogMiner to use the current online database dictionary rather than a
LogMiner dictionary contained in a flat file or in the redo log files being analyzed.
PRINT_PRETTY_SQL:
If set, LogMiner formats the reconstructed SQL statements for ease of
reading. These reconstructed SQL statements are not executable.
SKIP_CORRUPTION:
Directs a select operation on the GV$LOGMNR_CONTENTS view to skip any
corruptions in
the redo log file being analyzed and continue processing.
Supplemental Logging