zoukankan      html  css  js  c++  java
  • dataguard不同步问题ora-16191解决

    公司的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

    Cause: An attempt to ship redo to standby without logging on to standby or with invalid user credentials.
    Action: Check that primary and standby are using password files and that both primary and standby have the same SYS password. Restart primary and/or standby after ensuring that password file is accessible and REMOTE_LOGIN_PASSWORDFILE initialization parameter is set to SHARED or EXCLUSIVE.
     
    最后经检查发现是主备库的sys的密码不一致造成的,把主库的orapw文件copy一份到备库,再修改成备库的名字,就解决了。
  • 相关阅读:
    RuntimeError: An attempt has been made to start a new process before the current
    Expected object of backend CPU but got backend CUDA for argument #2 'weight'
    RuntimeError: multi-target not supported at
    模型load文件时报AttributeError: Can't get attribute 'Cours' on <module '__main__' from 错误
    ArrayList扩容源码分析
    HashMap源码分析(put/get)
    索引优化策略有哪些
    Mysql什么是回表查询和覆盖索引
    MyISAM与InnoDB区别
    使用ReentrantLock实现阻塞队列与交替打印
  • 原文地址:https://www.cnblogs.com/nazeebodan/p/4601516.html
Copyright © 2011-2022 走看看