scenario #
configured DR database for Oracle database version 12.1.0.2
Archive logs are shipping to standby and logs are getting applied on standby database
when I issue archive log list; Result as follows
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u02/archived/
Oldest online log sequence 0
Next log sequence to archive 0
Current log sequence 0
After I did alot of Investigation, I found information from metalink (Doc ID 2041137.1). This is a BUG. Do not use "archive log list" to compare primary and standby is in sync and use following Query's to compare both databases
Primary:
SQL> select thread#, max(sequence#) "Last Primary Seq Generated"
from v$archived_log val, v$database vdb
where val.resetlogs_change# = vdb.resetlogs_change#
group by thread# order by 1;
PhyStdby:
from v$archived_log val, v$database vdb
where val.resetlogs_change# = vdb.resetlogs_change#
group by thread# order by 1;
PhyStdby:
SQL> select thread#, max(sequence#) "Last Standby Seq Received"
from v$archived_log val, v$database vdb
where val.resetlogs_change# = vdb.resetlogs_change#
group by thread# order by 1;
PhyStdby:
from v$archived_log val, v$database vdb
where val.resetlogs_change# = vdb.resetlogs_change#
group by thread# order by 1;
PhyStdby:
SQL>select thread#, max(sequence#) "Last Standby Seq Applied"
from v$archived_log val, v$database vdb
where val.resetlogs_change# = vdb.resetlogs_change#
and val.applied in ('YES','IN-MEMORY')
group by thread# order by 1;
from v$archived_log val, v$database vdb
where val.resetlogs_change# = vdb.resetlogs_change#
and val.applied in ('YES','IN-MEMORY')
group by thread# order by 1;
--Nikhil Tatineni--
--Oracle 12c--