标签:
公司的11g的dataguard主备不同步,检查步骤如下:
Primary:查询主库的最大日志
SQL> select max(sequence#) from v$archived_log;
SQL> select max(sequence#) from v$archived_log where applied=‘YES‘;
standby:查询备库的最大日志
SQL> select max(sequence#) from v$archived_log;
SQL> select max(sequence#) from v$archived_log where applied=‘YES‘;
查询主库日志与备库是否一致
SQL> select sequence# from v$archived_log where recid = (select max(recid) from v$archived_log) and applied = ‘YES‘;
SQL> select sequence# from v$archived_log where recid = (select max(recid) from v$archived_log);
查主备库的日志是否已经一致了
SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
发现2边的日志数不一致。这个不同步的原因就是日志没有传过去,然后去主库那边OS上看,日志还存在,也就是说是传输过程出的问题。
然后查看主库的归档日志的状态:
SQL> select dest_name,status,error from v$archive_dest where rownum<3;
DEST_NAME STATUS ERROR
-------------------- --------- -------------------------------
LOG_ARCHIVE_DEST_1 VALID
LOG_ARCHIVE_DEST_2 ERROR ORA-16191: Primary log shipping client not logged on standby
发现传向备库的状态是error,报错ora-16191 ,官方文档的说明:
ORA-16191: Primary log shipping client not logged on standby
标签:
原文地址:http://www.cnblogs.com/suredandan/p/4601516.html