-
Bug
-
Resolution: Done
-
Major
-
1.5.0.CR1
-
None
-
False
-
False
-
Undefined
-
When an Oracle environment is using Data Guard, there will be additional rows written to the V$ARCHIVED_LOG table that must be excluded to avoid the exception:
java.sql.SQLException: ORA-01284: file xxxx cannot be opened ORA-00308: cannot open archive log 'xxxx' ORA-27037: unable to obtain file status ORA-06512: at "SYS.DBMS_LOGMNR", line 68 ORA-06512: at line 1
In 1.5.0.Beta2, we changed the log picking process to prefer archive logs over redo logs if the same SCN range was found because this avoids the concern with missing logfile during the mining session; however this subsequently led to this problem.
In V$ARCHIVED_LOG, there are multiple rows for the same SCN range. In fact, there is one row where STANDBY_DEST='NO' and another where the same column is YES. We need to filter these results by some predicate to avoid picking the wrong entries here that cannot be mined by LogMiner.
Solution 1: Use predicate DEST_ID IN (SELECT DEST_ID FROM V$ARCHIVE_DEST_STATUS WHERE STATUS = 'VALID' AND TYPE = 'LOCAL')
Solution 2: Use predicate STANDBY='NO'