Friday, February 28, 2014

Error: ORA-16571: Data Guard configuration file creation failure

Getting an error creating the broker configuration in DGMGRL
[root@rac1 ~]# dgmgrl sys/************@rac
DGMGRL for Linux: Version 11.2.0 - 64bit Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
Connected.
DGMGRL>
DGMGRL> create configuration RACDG as primary database is 'RAC' connect identifier is 'RAC';
Error: ORA-16571: Data Guard configuration file creation failure
Failed.
DGMGRL> 
This was annoying and there is not much help available online. but the fix is simple. We are getting this error oracle can not access the directory in which parameter dg_broker_config_file1 is stating to add configuration.

I was using the parameter below, but there is no directory DGBROKER so either I could have create the directory or change the parameter
SQL> show parameter dg_b
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
dg_broker_config_file1               string      +DATA/RAC/DGBROKER/dr1RAC.dat
dg_broker_config_file2               string      +DATA/RAC/DGBROKER/dr2RAC.dat
dg_broker_start                      boolean     TRUE
SQL>
What I did was changed the parameter I had to change it on PRIMARY and STANDBY
SQL> alter system set dg_broker_start=FALSE;
System altered.
SQL> alter system set dg_broker_config_file1='+DATA/dr1RAC.dat' scope=both sid='*';
System altered.
SQL> alter system set dg_broker_config_file2='+DATA/dr2RAC.dat' scope=both sid='*';
System altered.
SQL> alter system set dg_broker_start=TRUE;
System altered.
SQL>

And finally I was able to enable the configuration
[root@rac1 ~]# dgmgrl sys/*********@rac
DGMGRL for Linux: Version 11.2.0 - 64bit Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
Connected.
DGMGRL>
DGMGRL>
DGMGRL> create configuration RACDG as primary database is 'RAC' connect identifier is 'RAC';
Configuration "racdg" created with primary database "RAC"
DGMGRL>
DGMGRL> add database 'RAC_STBY' as connect identifier is 'RAC_STBY' maintained as physical;
Database "RAC_STBY" added
DGMGRL>
DGMGRL> enable configuration
Enabled.
DGMGRL>

No comments: