Recreate Dataguard Broker Configuration
for Primary and Standby
Step 1. Stop broker
in both of primary and standby databases (in all instances in case of
RAC):
SQL>
ALTER SYSTEM SET DG_BROKER_START=FALSE;
Step 2. Drop old broker
configuration files from both primary and standby:
ON PRIMARY
Check the location of files using : "show parameter dg_broker_config_file"
By default the broker configuration files will be in "$ORACLE_HOME/dbs" in Unix and "$ORACLE_HOME/database" in Windows.
SQL>
ALTER SYSTEM SET DG_BROKER_START=FALSE;
System
altered.
SQL>
SQL>
SQL>
show parameter dg_broker_config_file
NAME TYPE
VALUE
----------------------
----------- ------------------------------
dg_broker_config_file1
string /u01/app/oracle/product/11.2.0
.3/dbhome_2/dbs/dr1PROD.dat
dg_broker_config_file2
string /u01/app/oracle/product/11.2.0
.3/dbhome_2/dbs/dr2PROD.dat
Remove the broker configuration
file from primary to clear the configuration
vm224:PROD>
cd /u01/app/oracle/product/11.2.0.3/dbhome_2/dbs/
vm224:PROD>
rm dr*PROD*.dat
vm224:PROD>
exit
ON STANDBY
SQL>
ALTER SYSTEM SET DG_BROKER_START=FALSE;
System
altered.
SQL>
show parameter dg_broker_config_file
NAME TYPE
VALUE
----------------------
----------- ------------------------------
dg_broker_config_file1
string /u01/app/oracle/product/11.2.0
.3/dbhome_1/dbs/dr1STBY.dat
dg_broker_config_file2
string /u01/app/oracle/product/11.2.0
.3/dbhome_1/dbs/dr2STBY.dat
Remove the broker configuration
file from standby to clear the configuration
vm225:STBY>
cd /u01/app/oracle/product/11.2.0.3/dbhome_1/dbs/
vm225:STBY>
rm dr*STBY*.dat
vm225:STBY>
exit
Step 3. Start broker
in both of primary and standby (in all instances in case of
RAC):
ON PRIMARY & STANDBY
SQL>ALTER
SYSTEM SET DG_BROKER_START=TRUE;
Step 4. Connect to DGMGRL
on primary: (from instance one in case of RAC)
vm224:PROD>
dgmgrl sys/oracle@prod
Connected.
DGMGRL>
show configuration
ORA-16532:
Data Guard broker configuration does not exist
Configuration
details cannot be determined by DGMGRL
Step 5. Create
configuration on primary:
DGMGRL> CREATE CONFIGURATION DG_PROD as PRIMARY
DATABASE IS PROD connect IDENTIFIER is 'prod' ;
Configuration
"dg_prod" created with primary database "prod"
Step 6. Add standby in the
configuration:
DGMGRL>
ADD DATABASE STBY AS CONNECT IDENTIFIER IS 'stby' MAINTAINED AS PHYSICAL;
Database
"stby" added
Step 7. Enable Configuration
DGMGRL>
show configuration
Configuration
- dg_prod
Protection Mode: MaxPerformance
Databases:
prod - Primary database
stby - Physical standby database
Fast-Start
Failover: DISABLED
Configuration
Status:
DISABLED
Enable and Validate
Configuration
DGMGRL>
enable configuration ;
Enabled.
DGMGRL>
show configuration ;
Configuration
- dg_prod
Protection Mode: MaxPerformance
Databases:
prod - Primary database
stby - Physical standby database
Fast-Start
Failover: DISABLED
Configuration
Status:
SUCCESS
Hope this help...:)
No comments:
Post a Comment