网站建设费一般多少,低成本网络营销方式,wordpress退出登录界面,想建设个人网站去那里建设DG故障切换及DG Broker失效配置清理 DG故障强制切主DG Broker原有配置清理 DG故障强制切主
主库发生故障无法在短时间内恢复时#xff0c;需要执行主备切换。此时由于DG Broker无法连接到主库#xff0c;故不能通过Broker切换#xff0c;只能手动在备库进行切主。
--断开备… DG故障切换及DG Broker失效配置清理 DG故障强制切主DG Broker原有配置清理 DG故障强制切主
主库发生故障无法在短时间内恢复时需要执行主备切换。此时由于DG Broker无法连接到主库故不能通过Broker切换只能手动在备库进行切主。
--断开备库MRP进程
alter database recover managed standby database cancel;--手动切换备库为新的主库
alter database recover managed standby database finish force;
alter database commit to switchover to primary with session shutdown;--重启备库使得切主生效
shutdown immediate;
startup;--检查备库角色已转换为PRIMARY
select open_mode,database_role from v$database;DG Broker原有配置清理
故障切换后需要移除旧的DG Broker配置。由于是故障切换DG Broker配置信息没有更新因此不能直接通过DGMGRL命令来移除旧的配置信息。
[oracleprimarydbhost ~]$ dgmgrl / show configuration; [oracleprimarydbhost ~]$ dgmgrl / remove configuration; Error: ORA-12545: Connect failed because target host or object does not exist
Error: ORA-16625: cannot reach database orcldb_1[oracleprimarydbhost ~]$ dgmgrl / show configuration; Configuration - dg_orcldb
Protection Mode: MaxPerformance
Databases: orcldb_1 - Primary database orcldb_2 - Physical standby databaseFast-Start Failover: DISABLEDConfiguration Status:
ORA-12545: Connect failed because target host or object does not exist
ORA-16625: cannot reach database orcldb_1
DGM-17017: unable to determine configuration status[oracleprimarydbhost ~]$ dgmgrl / remove database orcldb_1;
Connected. Primary database cannot be removed[oracleprimarydbhost ~]$ dgmgrl / disable configuration;
Connected. Error: ORA-12545: Connect failed because target host or object does not exist
Error: ORA-16625: cannot reach database orcldb_1可行的办法是关闭dg_broker_start参数并清理相关配置文件然后重新开启该参数即可。
sysorcldb_2 show parameter dg_brokerNAME TYPE VALUE
---------------------- ------- ---------------------------------------------
dg_broker_config_file1 string /oracle/app/product/11204/dbs/dr1orcldb_2.dat
dg_broker_config_file2 string /oracle/app/product/11204/dbs/dr2orcldb_2.dat
dg_broker_start boolean TRUEorcldb_2 alter system set dg_broker_startfalse scopeboth;orcldb_2 !rm /oracle/app/product/11204/dbs/dr1orcldb_2.dat
orcldb_2 !rm /oracle/app/product/11204/dbs/dr2orcldb_2.datsysorcldb_2 alter system set dg_broker_starttrue scopeboth;System altered.确认旧的DG Broker配置是否已删除
[oracleprimarydbhost ~]$ dgmgrl / show configuration
Connected. ORA-16532: Data Guard broker configuration does not existConfiguration details cannot be determined by DGMGRL