To filter data by time, set the STARTTIME
and ENDTIME
parameters in the DBMS_LOGMNR.START_LOGMNR
procedure.
To avoid the need to specify the date format in the call to the PL/SQL DBMS_LOGMNR.START_LOGMNR
procedure, you can use the SQL ALTER
SESSION
SET NLS_DATE_FORMAT
statement first, as shown in the following example.
ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS'; EXECUTE DBMS_LOGMNR.START_LOGMNR( - DICTFILENAME => '/oracle/database/dictionary.ora', - STARTTIME => '01-Jan-2012 08:30:00', - ENDTIME => '01-Jan-2012 08:45:00'- OPTIONS => DBMS_LOGMNR.CONTINUOUS_MINE);
The timestamps should not be used to infer ordering of redo records. You can infer the order of redo records by using the SCN.
"Examples Using LogMiner" for a complete example of filtering data by time
Oracle Database PL/SQL Packages and Types Reference for information about what happens if you specify starting and ending times and they are not found in the LogMiner redo log file list, and for information about how these parameters interact with the CONTINUOUS_MINE
option