How To Relocate Data Guard Broker Configuration File Onto ASM

Just after the database migrated onto ASM, it is noticed that DG broker configuration files are still sitting on the default locations as following:

SQL>  show parameter dg_broker_config

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
dg_broker_config_file1               string      /u02/app/oracle/product/12.1.0
                                                 /dbhome_1/dbs/dr1TESTDB.dat
dg_broker_config_file2               string      /u02/app/oracle/product/12.1.0
                                                 /dbhome_1/dbs/dr2TESTDB.dat

Stop the broker

SQL> alter system set dg_broker_start = FALSE;

Set the dg_broker_config_file1 & 2 parameters to new location

SQL> alter system set dg_broker_config_file1 = '+DATAC1/TESTDB/dr1TESTDB.dat';
SQL> alter system set dg_broker_config_file2 = '+DATAC1/TESTDB/dr2TESTDB.dat'

Restart the broker

SQL> alter system set dg_broker_start = TRUE;

Recreate the Data Guard Configuration

DGMGRL>  CREATE CONFIGURATION 'TESTDB' AS PRIMARY DATABASE IS 'TESTDB' CONNECT IDENTIFIER IS 'TESTDB' ;
Configuration "TESTDB" created with primary database "TESTDB"

DGMGRL>ADD DATABASE 'TESTBYDB' AS CONNECT IDENTIFIER IS 'TESTBYDB' MAINTAINED AS PHYSICAL;
Database "TESTBYDB" added

DGMGRL> enable configuration;
Enabled.

Verify the results

ASMCMD> pwd
+DATAC1/TESTDB
ASMCMD>  ls -lt
Type             Redund  Striped  Time             Sys  Name
                                                   Y    TEMPFILE/
                                                   Y    PASSWORD/
                                                   Y    PARAMETERFILE/
                                                   Y    ONLINELOG/
                                                   Y    DATAGUARDCONFIG/
                                                   Y    DATAFILE/
                                                   Y    CONTROLFILE/
                                                   Y    2347F41E951336CFE053200F030A8127/
                                                   Y    2346D55DBF2B64B2E053200F030A299D/
DATAGUARDCONFIG  HIGH    COARSE   OCT 04 17:00:00  N    dr2testdb.dat => +DATAC1/TESTDB/DATAGUARDCONFIG/TESTDB.290.1085073589
DATAGUARDCONFIG  HIGH    COARSE   OCT 04 17:00:00  N    dr1testdb.dat => +DATAC1/TESTDB/DATAGUARDCONFIG/TESTDB.561.1085073589

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.