Oracle DG中日志不同步的ORA-16191错误解决整理

0    205    2

Tags:

👉 本文共约2150个字,系统预计阅读时间或需9分钟。

现象

告警日志报错:

解释:

查询报错:

可能的原因

密码文件问题

ORA-16191: Primary Log Shipping Client Not Logged On Standby Error in Dataguard Environment after SYS Password Change (Doc ID 2420498.1)

这个容易解决,可以重建如下密码文件,或建议在一个节点生成密码文件,然后将该文件拷贝到其它节点。

从12c开始,DG可以自动同步密码文件。参考:https://my.dbaup.com/oracle-12cdedgzidongtongbumimawenjian-asm-xintexinggongxiangmimawenjian.html

分析步骤

  1. Check where the Password File is located :

a. If within '$ORACLE_HOME/dbs", then File naming should be as "orapw$ORACLE_SID" (example : orapwORCL)

For RAC, need to ensure that correct ORACLE_SID/INSTANCE_NAME is reflecting in the Password File Name of each instance (orapw$ORACLE_SID => example : orapwORCL1, orapwORCL2)

b. Password File within ASM Disk Group and registered in OCR

Check the output of "$ srvctl config database -d " to see if Password File field is populated

  1. Checksum of Password Files at Primary and Standby should match

    Check the output of "md5sum orapwORCL" at each Node of Primary and Standby

  2. remote_login_passwordfile=EXCLUSIVE

  3. sec_case_sensitive_logon=TRUE

    If set to TRUE, then ensure that password file is created with option IGNORECASE=N
    If set to FALSE, then ensure that password file is created with option IGNORECASE=Y

系统触发器问题

参考:Error 1017 / ORA-16191 In Standby Alertlog (Doc ID 2225190.1)

ORA-16191 ORA-01017 and ORA-16000 shipping the logs to Standby database (Doc ID 2129339.1)

In this particular case, customer had a custom (non-Oracle supplied) login trigger on primary. This was preventing standby to connect to primary to query gap status.

在这种情况下,客户在主库上有一个自定义(非Oracle提供的)登录触发器。这导致备用库无法连接到主库以查询gap状态。

主库告警日志报错:

备库告警日志:

In this case rmseprod is the FAL_SERVER and points to primary database. A manual sqlplus connection to primary is fine using: sqlplus sys/password@rmseprod as sysdba

Also, we verified that password file is copied from primary and it's checksum matches with the one on primary.

解决:主备库都需要运行,且在手工追加完gap后,重启数据库:

本人提供Oracle(OCP、OCM)、MySQL(OCP)、PostgreSQL(PGCA、PGCE、PGCM)等数据库的培训和考证业务,私聊QQ646634621或微信dbaup66,谢谢!
AiDBA后续精彩内容已被站长无情隐藏,请输入验证码解锁本文!
验证码:
获取验证码: 请先关注本站微信公众号,然后回复“验证码”,获取验证码。在微信里搜索“AiDBA”或者“dbaup6”或者微信扫描右侧二维码都可以关注本站微信公众号。

标签:

Avatar photo

小麦苗

学习或考证,均可联系麦老师,请加微信db_bao或QQ646634621

您可能还喜欢...

发表回复