DGMGRL> show configuration
Configuration - dg
Protection Mode: MaxPerformance
Databases:
ogg2 - Primary database
ogg1 - Physical standby database (disabled)
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS
DGMGRL> show database verbose ogg1
Database Status:
DGM-17016: failed to retrieve status for database "ogg1"
ORA-16603: Data Guard broker detected a mismatch in configuration ID
ORA-16625: cannot reach database "ogg1"
解决办法:
可以解决ORA-16603 和 ORA-16652错误。
在主备库都执行:
1. alter system set DG_BROKER_START=false;
2.删除如下的文件
14:45:50 SQL> show parameter DG_BROKER_CONFIG
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
dg_broker_config_file1 string /u01/app/oracle/product/11.2.0
/dbhome_1/dbs/dr1oradgphy.dat
dg_broker_config_file2 string /u01/app/oracle/product/11.2.0
/dbhome_1/dbs/dr2oradgphy.dat
3. alter system set DG_BROKER_START=true;
[oracle@rhel6_lhr admin]$ oerr ora 16603
16603, 00000, "Data Guard broker detected a mismatch in configuration ID"
// *Cause: There was a mismatch in configuration unique ID. This could occur
// if the original configuration was re-created while this database
// was disconnected from the network or the same database was added
// to two different Data Guard broker configurations.
// *Action: Make sure the database belongs to only one broker configuration.
// Shut down the broker by setting the DG_BROKER_START initialization
// parameter to false. Then remove the Data Guard broker configuration
// files. Finally restart the broker by setting the DG_BROKER_START
// initialization parameter to true.
4.[oracle@rhel6_lhr admin]$ ll /u01/app/oracle/product/11.2.0/dbhome_1/dbs/dr*
-rw-r----- 1 oracle asmadmin 16384 Sep 28 12:11 /u01/app/oracle/product/11.2.0/dbhome_1/dbs/dr1oradg11g.dat
-rw-r----- 1 oracle asmadmin 16384 Sep 28 14:47 /u01/app/oracle/product/11.2.0/dbhome_1/dbs/dr1oradgphy.dat
-rw-r----- 1 oracle asmadmin 16384 Sep 28 12:10 /u01/app/oracle/product/11.2.0/dbhome_1/dbs/dr2oradg11g.dat
-rw-r----- 1 oracle asmadmin 16384 Sep 28 14:47 /u01/app/oracle/product/11.2.0/dbhome_1/dbs/dr2oradgphy.dat
5.[oracle@rhel6_lhr admin]$ rm -rf /u01/app/oracle/product/11.2.0/dbhome_1/dbs/dr*
[oracle@rhel6_lhr ~]$ dgmgrl sys/lhr@tns_oradgphy_dgmgrl
DGMGRL for Linux: Version 11.2.0.3.0 - 64bit Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.
欢迎使用 DGMGRL, 要获取有关信息请键入 "help"。
已连接。
DGMGRL> show configuration;
ORA-16532: Data Guard 中介配置不存在
配置详细资料不能由 DGMGRL 确定
DGMGRL>
DGMGRL>
DGMGRL> create configuration ‘fsf_oradg11g_lhr‘ as
> primary database is ‘oradgphy‘
> connect identifier is tns_oradgphy_dgmgrl;
add database ‘oradg11g‘ as
connect identifier is tns_oradg11g_dgmgrl
maintained as physical;
已创建配置 "fsf_oradg11g_lhr", 其中主数据库为 "oradgphy"
DGMGRL> DGMGRL> > > 已添加数据库 "oradg11g"
DGMGRL> DGMGRL>
DGMGRL>
DGMGRL>
DGMGRL>
DGMGRL>
DGMGRL>
DGMGRL>
DGMGRL> show configuration
配置 - fsf_oradg11g_lhr
保护模式: MaxPerformance
数据库:
oradgphy - 主数据库
oradg11g - 物理备用数据库
快速启动故障转移: DISABLED
配置状态:
DISABLED
DGMGRL> enable configuration
已启用。
DGMGRL> show configuration
配置 - fsf_oradg11g_lhr
保护模式: MaxPerformance
数据库:
oradgphy - 主数据库
oradg11g - 物理备用数据库
快速启动故障转移: DISABLED
配置状态:
SUCCESS
DGMGRL> switchover to oradg11g
立即执行切换, 请稍候...
新的主数据库 "oradg11g" 正在打开...
操作要求关闭实例 "oradgphy" (在数据库 "oradgphy" 上)
正在关闭实例 "oradgphy"...
ORACLE 例程已经关闭。
操作要求启动实例 "oradgphy" (在数据库 "oradgphy" 上)
正在启动实例 "oradgphy"...
ORACLE 例程已经启动。
数据库装载完毕。
数据库已经打开。
切换成功, 新的主数据库为 "oradg11g"
DGMGRL> show configuration
配置 - fsf_oradg11g_lhr
保护模式: MaxPerformance
数据库:
oradg11g - 主数据库
oradgphy - 物理备用数据库
快速启动故障转移: DISABLED
配置状态:
SUCCESS
DGMGRL>