How to Configure Multiple Standby Databases in Data Guard

The following environment and naming are involved in this post:

Primary Database :
db_name : PRIMDB
db_unique_name : PRIMDB
Standby Database 1 :
db_name : PRIMDB
db_unique_name : STDBY1DB
Standby Database 2:
db_name : PRIMDB
db_unique_name : STDBY2DB
Standby Database 3 :
db_name : PRIMDB
db_unique_name : STDBY3DB

Create First Standby and Configure Data Guard

For how to create a standby database and configure DG, please refer to Oracle Doc, or our posts in this blog.
How to Setup Data Guard Physical Standby in Oracle Database 18c
Create Physical Standby Database from Active Database in 12c
Create Standby Database From Active Database Duplication in 11gR2
Create a 12c RAC Standby Database From Overnight RMAN Tape Backups
Create Standby Database From RMAN Backup

After first standby database “STDBY1DB” successfully created, the Data Guard is configure as the following:

DGMGRL> show configuration

Configuration - PRIMDB

  Protection Mode: MaxPerformance
  Members:
      PRIMDB - Primary database
    STDBY1DB - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 6 seconds ago)

Create the Rest Standby Databases

Now it is time to create standby database STDBY2DB and STDBY3DB, the typical parameters for STDBY3DB will be the followings:

db_unique_name = 'STDBY3DB'
db_name='PRIMDB'
fal_server=PRIMDB,STDBY1DB,STDBY2DB
fal_client=STDBY3DB
db_file_name_convert  = 'PRIMDB','STDBY3DB'
log_file_name_convert = 'PRIMDB','STDBY3DB'
log_archive_dest_1 =LOCATION=USE_DB_RECOVERY_FILE_DEST 

here make sure fal_server include all primary and standby databases , except itself.

Set log_archive_config Parameter in All the Databases

Run the following sql command on all databases including primary and standby databases.

SQL>alter system set log_archive_config='dg_config=(PRIMDB,STDBY1DB,STDBY2DB,STDBY3DB)';

Enable DG Broker in Second and Third Standby

Run the following command in second and third standby databases:

SQL> ALTER SYSTEM SET DG_BROKER_START = TRUE;

Add the Second and Third Standby Database to DG

Run DGMGRL utility on primary database:

DGMGRL> add database 'STDBY2DB' as connect identifier is 'STDBY2DB' maintained as physical;
Database "STDBY2DB" added

DGMGRL> add database 'STDBY3DB' as connect identifier is 'STDBY3DB' maintained as physical;
Database "STDBY3DB" added
DGMGRL> enable database 'STDBY2DB' ;
Enabled.

DGMGRL> enable database 'STDBY3DB' ;
Enabled.

Verify DG Configuration

DGMGRL>  show configuration;

Configuration - PRIMDB 

  Protection Mode: MaxPerformance
  Members:
      PRIMDB - Primary database
    STDBY1DB - Physical standby database
    STDBY2DB - Physical standby database
    STDBY3DB - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 4 seconds ago)

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.