DG备库执行 archive log list 命令,sequence显示为0,现象如下:
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /oradata/arch
Oldest online log sequence 0
Next log sequence to archive 0
Current log sequence 0
上面的显示不代表DG同步失败并出现问题,而是一个bug。
Oracle建议使用以下查询,来确定DG是否同步正常。
主库(最后生成的归档号):
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;
备库(最后接收的归档号):
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;
备库(最后应用的归档号):
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;