enter code here
I am facing an issue when reading the oracle logs through time interval.
Issue: In oracle , while data is getting inserted through some external application, If I am using log miner to read the oracle logs, It gives me duplicate records. For example, suppose if there is a time interval t1,t2,t3. Data is inserted from t1 to t3. Meanwhile If I am using log miner to read the data from t1 to t2 and then t2 to t3. Then there are some records which are coming in both the intervals.
One observation :Records which are showing duplicates are at the end of first interval and at the beginning for second interval.
Queries which I am using:
begin dbms_logmnr.start_logmnr(STARTTIME => t1,ENDTIME =>t2,OPTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG + DBMS_LOGMNR.CONTINUOUS_MINE + DBMS_LOGMNR.COMMITTED_DATA_ONLY);end;
select sql_redo from V$LOGMNR_CONTENTS WHERE OPERATION IN('INSERT','UPDATE','DELETE') and table_name = xyz
begin dbms_logmnr.start_logmnr(STARTTIME => t2,ENDTIME =>t3,OPTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG + DBMS_LOGMNR.CONTINUOUS_MINE + DBMS_LOGMNR.COMMITTED_DATA_ONLY);end;
select sql_redo from V$LOGMNR_CONTENTS WHERE OPERATION IN('INSERT','UPDATE','DELETE') and table_name = xyz
Date format which I am using to start miner: DD-MON-YYYY HH24:MI:SS
Note:Data is being committed as soon as it is getting inserted.
Accoring to oracle documentation , in logminr, start time will be used as greater then or equal to , and end time will be used as less then or equal to. So logmnr is designed in this way.