How to remove database from Data Guard Configuration
On Primary:
No | Step | Details / Screnshot |
1 | Login to dgmgrl | dgmgrl |
2 | Connect to Primary Database | connect sys/abc123@MoidPR |
3 | Check Configuration | show configuration DGMGRL> show configuration Configuration Name: broker Enabled: YES Protection Mode: MaxPerformance Fast-Start Failover: DISABLED Databases: MoidPR - Primary database MoidDG - Physical standby database Current status for "broker": SUCCESS |
4 | Remove configuration | remove configuration DGMGRL> remove configuration Removed configuration |
5 | Exit out of dgmgrl | exit |
6 | Set oracle environment to Primary Database | . oraenv → MoidPR |
7 | Login as sys | sqlplus / as sysdba |
8 | Find out where archives writing to locally? | show parameter log_archive_dest_1 |
9 | Find out where archives write to remotely? | show parameter log_archive_dest_2 |
10 | Verify dg_broker is set to TRUE | select name , value from v$parameter where name like '%dg_broker%'; |
11 | Turn DG_BROKER to FALSE | alter system set dg_broker_start=FALSE; SQL> alter system set dg_broker_start=FALSE; System altered. |
12 | Verify LOG_ARCHIVE_DEST_2 is removed. | show parameter log_archive_dest_2 |
13 | exit ot of SQL | exit; |
On standby:
No | Step | Details / Screnshot |
1 | SEt oracle environment to Standby Database. | . oraenv → MoidDG |
2 | Login as sys | sqlplus / as sysdba |
3 | Set DG_BROKER to FALSE | alter system set dg_broker_start=FALSE; SQL> alter system set dg_broker_start=FALSE; System altered. |
Optionally: On Primary and Standby
No | Step | Details / Screnshot |
1 | Find where the .dat files are remove them | show parameter dg_broker_config_file1 show parameter dg_broker_config_file2 NAME TYPE VALUE ------------------------ ------- ---- dg_broker_config_file1 string /u01/app/oracle/product/11.2.0/db_1/dbs/dr1MoidPR.dat dg_broker_config_file1 string /u01/app/oracle/product/11.2.0/db_1/dbs/dr1MoidDG.dat |
2 | Move the Data Broker Files | cd $ORACLE_HOME/dbs mv MoidPR.dat dr1MoidPR.dat.bak mv MoidDG.dat dr2MoidDG.dat.bak |
Hope this helps.
Comments
Post a Comment