You can query the V$LOGMNR_LOGS
view to determine which redo log files have been manually or automatically added to the list of redo log files for LogMiner to analyze. This view contains one row for each redo log file. It provides valuable information about each of the redo log files including file name, sequence #, SCN and time ranges, and whether it contains all or part of the LogMiner dictionary.
After a successful call to DBMS_LOGMNR.START_LOGMNR
, the STATUS
column of the V$LOGMNR_LOGS
view contains one of the following values:
0
Indicates that the redo log file will be processed during a query of the V$LOGMNR_CONTENTS
view.
1
Indicates that this will be the first redo log file to be processed by LogMiner during a select operation against the V$LOGMNR_CONTENTS
view.
2
Indicates that the redo log file has been pruned and therefore will not be processed by LogMiner during a query of the V$LOGMNR_CONTENTS
view. It has been pruned because it is not needed to satisfy your requested time or SCN range.
4
Indicates that a redo log file (based on sequence number) is missing from the LogMiner redo log file list.
The V$LOGMNR_LOGS
view contains a row for each redo log file that is missing from the list, as follows:
The FILENAME
column will contain the consecutive range of sequence numbers and total SCN range gap.
For example: 'Missing log file(s) for thread number 1, sequence number(s) 100 to 102'.
The INFO
column will contain the string 'MISSING_LOGFILE'.
Information about files missing from the redo log file list can be useful for the following reasons:
The DDL_DICT_TRACKING
and CONTINUOUS_MINE
options that can be specified when you call DBMS_LOGMNR.START_LOGMNR
will not allow redo log files to be missing from the LogMiner redo log file list for the requested time or SCN range. If a call to DBMS_LOGMNR.START_LOGMNR
fails, then you can query the STATUS
column in the V$LOGMNR_LOGS
view to determine which redo log files are missing from the list. You can then find and manually add these redo log files and attempt to call DBMS_LOGMNR.START_LOGMNR
again.
Although all other options that can be specified when you call DBMS_LOGMNR.START_LOGMNR
allow files to be missing from the LogMiner redo log file list, you may not want to have missing files. You can query the V$LOGMNR_LOGS
view before querying the V$LOGMNR_CONTENTS
view to ensure that all required files are in the list. If the list is left with missing files and you query the V$LOGMNR_CONTENTS
view, then a row is returned in V$LOGMNR_CONTENTS
with the following column values:
In the OPERATION
column, a value of 'MISSING_SCN'
In the STATUS
column, a value of 1291
In the INFO
column, a string indicating the missing SCN range (for example, 'Missing SCN 100 - 200')