Skip to content
Home » Oracle Database » How to Resolve ORA-16571: Oracle Data Guard configuration file creation failure

How to Resolve ORA-16571: Oracle Data Guard configuration file creation failure

ORA-16571

ORA-16571 means that DGMGRL tried to create or save broker files on the destination you designed, but somehow it failed in DGMGRL command line interface.

For example, when we tried to create a configuration for 19c data guard broker, we got ORA-16571 like this.

[oracle@primary-19c ~]$ dgmgrl /
DGMGRL for Linux: Release 19.0.0.0.0 - Production on Tue Aug 6 17:36:18 2019
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

Welcome to DGMGRL, type "help" for information.
Connected to "PRIMDB"
Connected as SYSDG.
DGMGRL> create configuration DRCONF as primary database is PRIMDB connect identifier is PRIMDB;
Error: ORA-16571: Oracle Data Guard configuration file creation failure

There're several possibilities may cause the problem.

  1. No Space to Save File
  2. Directory Does Not Exist
  3. Directory Owner is Not Oracle
  4. Directory Permission is Not Proper

1. No Space to Save File

Usually, space will not be the problem, because the broker configuration file is pretty small (12kB) initially, you can always create the files even though the space is 99% full. But if it's the worst case, you should make room for your files so as to solve ORA-16571. For Linux, you can use df -h to check space usage.

2. Directory Does Not Exist

Let's check the location of broker configuration files in the database.

SQL> show parameter broker;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
connection_brokers                   string      ((TYPE=DEDICATED)(BROKERS=1)),
                                                  ((TYPE=EMON)(BROKERS=1))
dg_broker_config_file1               string      /u02/brokers/dr1PRIMDB.dat
dg_broker_config_file2               string      /u02/brokers/dr2PRIMDB.dat
dg_broker_start                      boolean     TRUE
use_dedicated_broker                 boolean     FALSE

Then we checked the existence of the directory.

[root@primary-19c ~]# ll /u02
ls: cannot access /u02: No such file or directory

Oh, it's not existing. Let's create it.

[root@primary-19c ~]# mkdir -p /u02/brokers

3. Directory Owner is Not Oracle

We still got the same error when created a broker configuration in DGMGRL.

DGMGRL> create configuration DRCONF as primary database is PRIMDB connect identifier is PRIMDB;
Error: ORA-16571: Oracle Data Guard configuration file creation failure

Failed.

Let's check the owner of directory.

[root@primary-19c ~]# ll /u02
total 0
dr-xr-xr-x 2 root root 6 Aug  6 17:50 brokers

The directory owner had better to be oracle, so we changed the owner from root into oracle.

[root@primary-19c ~]# chown -R oracle:oinstall /u02

4. Directory Permission is Not Proper

We still got the same error when created a broker configuration in DGMGRL.

DGMGRL> create configuration DRCONF as primary database is PRIMDB connect identifier is PRIMDB;
Error: ORA-16571: Oracle Data Guard configuration file creation failure

Failed.

ORA-16571 again? What's wrong with the directory? Let's inspect the permission closely.

[root@primary-19c ~]# ll /u02
total 0
dr-xr-xr-x 2 root root 6 Aug  6 17:50 brokers

As we can see, the directory cannot be written. Let's add write permission to the directory.

[root@primary-19c ~]# chmod u+w -R /u02
[root@primary-19c ~]# ll /u02
total 0
drwxr-xr-x 2 oracle oinstall 6 Aug  6 17:50 brokers

Let's do it again.

DGMGRL> create configuration drconf as primary database is PRIMDB connect identifier is PRIMDB;
Configuration "drconf" created with primary database "primdb"

Finally, we succeeded to create a broker configuration by fixing the permission of the directory. That's how we solve ORA-16571.

In summary, ORA-16571 is essentially related to permission problem of the configuration files. So any other permission issues could also cause the error.

The Rest of Configuration

Do you want to see more? All right, let's continue.

DGMGRL> add database STANDB as connect identifier is STANDB maintained as physical;
Database "standb" added
DGMGRL> enable configuration;
Enabled.
DGMGRL> enable database primdb;
Enabled.
DGMGRL> enable database standb;
Enabled.
DGMGRL> show configuration verbose;

Configuration - drconf

  Protection Mode: MaxPerformance
  Members:
  primdb - Primary database
    standb - Physical standby database

  Properties:
    FastStartFailoverThreshold      = '30'
    OperationTimeout                = '30'
    TraceLevel                      = 'USER'
    FastStartFailoverLagLimit       = '30'
    CommunicationTimeout            = '180'
    ObserverReconnect               = '0'
    FastStartFailoverAutoReinstate  = 'TRUE'
    FastStartFailoverPmyShutdown    = 'TRUE'
    BystandersFollowRoleChange      = 'ALL'
    ObserverOverride                = 'FALSE'
    ExternalDestination1            = ''
    ExternalDestination2            = ''
    PrimaryLostWriteAction          = 'CONTINUE'
    ConfigurationWideServiceName    = 'COMPDB_CFG'

Fast-Start Failover:  Disabled

Configuration Status:
SUCCESS

DGMGRL> show database primdb;

Database - primdb

  Role:               PRIMARY
  Intended State:     TRANSPORT-ON
  Instance(s):
    PRIMDB

Database Status:
SUCCESS

DGMGRL> show database standb;

Database - standb

  Role:               PHYSICAL STANDBY
  Intended State:     APPLY-ON
  Transport Lag:      0 seconds (computed 1 second ago)
  Apply Lag:          0 seconds (computed 1 second ago)
  Average Apply Rate: 98.00 KByte/s
  Real Time Query:    OFF
  Instance(s):
    STANDB

Database Status:
SUCCESS

Leave a Reply

Your email address will not be published. Required fields are marked *