环境:
OS:Centos 7
DB:11.2.0.4
架构:2节点RAC->单节点
配置好dgbroker后,在做switchover的过程中失败,想按照常规方式删除dgbroker不行,只能采用暴力的方式.
1.尝试删除配置
我这里是在rac其中一个节点上执行,节点1上执行
DGMGRL> remove configuration
Error: ORA-16623: database detected role change
Error: ORA-16625: cannot reach database "oradg"
2.删除配置文件
RAC节点
SQL> show parameters dg_broker;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
dg_broker_config_file1 string +DATA/slnngk/dgbroker/slnngk_config1.ora
dg_broker_config_file2 string +DATA/slnngk/dgbroker/slnngk_config2.ora
dg_broker_start boolean TRUE
SQL>
单节点
SQL> show parameters dg_broker;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
dg_broker_config_file1 string /u01/app/oracle/product/11.2.0.4/db_1/dbs/oradg_config1.ora
dg_broker_config_file2 string /u01/app/oracle/product/11.2.0.4/db_1/dbs/oradg_config2.ora
dg_broker_start boolean TRUE
删除:
RAC:
[oracle@rac01 ~]$ su - grid
Password:
[oracle@rac01 ~]$ exit
logout
[root@rac01 ~]# su - grid
Last login: Mon Sep 13 03:55:30 EDT 2021 on pts/2
[grid@rac01 ~]$ asmcmd
ASMCMD> rm +DATA/slnngk/dgbroker/slnngk_config1.ora
ASMCMD> rm +DATA/slnngk/dgbroker/slnngk_config2.ora
单节点:
[oracle@oradg admin]$ rm /u01/app/oracle/product/11.2.0.4/db_1/dbs/oradg_config1.ora
[oracle@oradg admin]$ rm /u01/app/oracle/product/11.2.0.4/db_1/dbs/oradg_config2.ora
3.关闭dg_broker_start
RAC:
SQL> connect / as sysdba
Connected.
SQL> alter system set dg_broker_start=false scope=both;
System altered.
单节点:
SQL> alter system set dg_broker_start=false scope=both;
4.这个时候登陆进去就没有配置信息了,下面可以重新配置dgbroker
[oracle@rac01 ~]$ dgmgrl
DGMGRL for Linux: Version 11.2.0.4.0 - 64bit Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/oracle
Connected.
DGMGRL> show configuration;
Error:
ORA-16525: the Data Guard broker is not yet available
Configuration details cannot be determined by DGMGRL
DGMGRL>
--The End--