dgbroker搭建报错ORA-16577
【环境说明】
19C rac + DG
【报错信息】
使用dgmgrl配置DG后报错:
2023-02-28T21:54:51.264-05:00 01001000 1124966611 DMON: Updated broker configuration file available, loading from "/u01/app/oracle/product/19.3.0/db/dbs/dr2orcl.dat"
2023-02-28T21:54:51.264-05:00 01001000 1124966611 DMON: Metadata available (1.2.1124966611), loading from "/u01/app/oracle/product/19.3.0/db/dbs/dr2orcl.dat"
2023-02-28T21:54:51.264-05:00 01001000 1124966611 Opcode = CTL_ENABLE, Chief Instance I_ID = 1
2023-02-28T21:54:51.265-05:00 DMON: rfc_ckhomblk expected MIV=54, but found MIV=0
2023-02-28T21:54:51.265-05:00 01001000 1124966611 DMON: rfm_metadata_avail: failed to load from metadata file /u01/app/oracle/product/19.3.0/db/dbs/dr2orcl.dat: status ORA-16577.
2023-02-28T21:54:51.265-05:00 01001000 1124966611 Operation CTL_ENABLE continuing with warning, status = ORA-16577
2023-02-28T21:55:06.690-05:00 73614074 40 DMON: Updated broker configuration file available, loading from "/u01/app/oracle/product/19.3.0/db/dbs/dr1orcl.dat"
2023-02-28T21:55:06.690-05:00 73614074 40 DMON: Metadata available (16608.0.40), loading from "/u01/app/oracle/product/19.3.0/db/dbs/dr1orcl.dat"
2023-02-28T21:55:06.690-05:00 rfsxm_opcode2str: task opcode (16502) is not supported.
2023-02-28T21:55:06.690-05:00 73614074 40 Opcode = 00016502, Chief Instance I_ID = 0
2023-02-28T21:55:06.691-05:00 DMON: rfc_ckhomblk expected MIV=54, but found MIV=0
2023-02-28T21:55:06.691-05:00 73614074 40 DMON: rfm_metadata_avail: failed to load from metadata file /u01/app/oracle/product/19.3.0/db/dbs/dr1orcl.dat: status ORA-16577.
2023-02-28T21:55:06.691-05:00 rfsxm_opcode2str: task opcode (16502) is not supported.
2023-02-28T21:55:06.692-05:00 73614074 40 Operation 00016502 continuing with warning, status = ORA-16577
【报错分析】
使用dgmgr时候主要涉及三个参数
Step By Step How to Recreate Dataguard Broker Configuration on Windows and Unix.
dg_broker_start
dg_broker_config_file1
dg_broker_config_file2
查看当前数据库的dg_broker_config_file1跟dg_broker_config_file1路径都是本地主机上面的,根据MOS查看该报错需要调整参数
Broker reports ORA-16809 for RAC Primary DB (Doc ID 2912201.1)
在rac架构上面需要将两个参数的设置为共享的位置:
【解决办法】
使用grid用户使用asmcmd在共享存储里面创建共享的目录:
+DATA/dgshare/
设置参数:
ALTER SYSTEM SET dg_broker_start=false scope=both;
alter system set dg_broker_config_file1='+DATA/dgshare/dr1orcl.dat' SID='*' scope=both;
alter system set dg_broker_config_file2='+DATA/dgshare/dr2orcl.dat' SID='*' scope=both;
重新使用dgmgr配置
DGMGRL> CREATE CONFIGURATION dg_config AS PRIMARY DATABASE IS orcl CONNECT IDENTIFIER IS orcl;
Configuration "dg_config" created with primary database "orcl"
DGMGRL> ADD DATABASE orcl_stby AS CONNECT IDENTIFIER IS orcl_stby MAINTAINED AS PHYSICAL;
Error: ORA-16603: member is part of another Data Guard broker configuration
配置遇到ORA-16603报错,这里提示从库已经在其他的broker配置过了
同时需要将从库的配置从新设置一下
ALTER SYSTEM SET dg_broker_start=false scope=both;
然后删除一下文件dg_broker_config_file1、dg_broker_config_file2:
/u01/app/oracle/product/19.3.0/db/dbs/dr1orcl_stby.dat
/u01/app/oracle/product/19.3.0/db/dbs/dr2orcl_stby.dat
然后重新开启dg broker参数
ALTER SYSTEM SET dg_broker_start=true scope=both;
重新关联从库
DGMGRL> ADD DATABASE orcl_stby AS CONNECT IDENTIFIER IS orcl_stby MAINTAINED AS PHYSICAL;
Database "orcl_stby" added
DGMGRL> ENABLE CONFIGURATION;
Enabled.
查看配置及日志信息
show configuration;
DGMGRL> show configuration;
Configuration - dg_config
Protection Mode: MaxPerformance
Members:
orcl - Primary database
orcl_stby - Physical standby database
Fast-Start Failover: Disabled
Configuration Status:
SUCCESS (status updated 30 seconds ago)
show database 'orcl' statusreport;
show database verbose orcl;
show database verbose orcl_stby;
以上命令可以看具体信息及日志路径信息
日志:
2023-02-28T22:02:46.881-05:00
Updated broker configuration file available, loading from "+DATA/dgshare/dr1orcl.dat"
2023-02-28T22:22:47.000-05:00
Updated broker configuration file available, loading from "+DATA/dgshare/dr2orcl.dat"
2023-02-28T22:23:03.337-05:00
Updated broker configuration file available, loading from "+DATA/dgshare/dr1orcl.dat"