How to configure the DGMGRL dataguard broker service on Oracle Dataguard Environment

How to Configure Oracle Data Guard Broker (DGMGRL) in Docker

Introduction

Oracle Data Guard ensures high availability, but managing it manually is complex.
Using Oracle Data Guard Broker simplifies administration, monitoring, and failover.


🧱 Prerequisites

  • Docker-based Primary & Standby setup
  • Working Data Guard configuration
  • SYS user access
  1. Check the Status of Broker service parameter is enabled or disabled. ( Set both on Primary or Standby Database Server)
Show parameter dg_broker_start
Note: return TRUE means Enabled or False means diabled
show parameter dg_broker_config_file1
show parameter dg_broker_config_file2
Check the files location is present or not if present you can use that also if not you can set as follows:
ALTER SYSTEM SET dg_broker_config_file1='/opt/oracle/dg1.dat';
ALTER SYSTEM SET dg_broker_config_file2='/opt/oracle/dg2.dat';

2. If its disabled, then enable the broker parameter: ( on both Primary or Standby)

ALTER SYSTEM SET dg_broker_start=TRUE;

3. Connect the DGMGRL on Primary

dgmgrl sys@primary_db

4. Create Configuration

Note: primary_db = DB_UNIQUE_NAME of the primary database

Note: CONNECT IDENTIFIER IS primary_db : It uses TNS entry / service name

CREATE CONFIGURATION dg_config AS
PRIMARY DATABASE IS primary_db
CONNECT IDENTIFIER IS primary_db;
Example:
DGMGRL> CREATE CONFIGURATION dg_config AS PRIMARY DATABASE IS PRIMARY CONNECT IDENTIFIER IS primary;
Configuration "dg_config" created with primary database "primary"
DGMGRL>

5. Enable the configuration after create it.

DGMGRL> ENABLE CONFIGURATION;
Enabled.

6. Add the Standby Database ( on Primary dgmgrl)

DGMGRL> ADD DATABASE STANDBY AS CONNECT IDENTIFIER IS standby;
Database "standby" added

7. Enable the Standby:

DGMGRL> ENABLE DATABASE standby;
Enabled.

8. Verify the configuration after enable:

DGMGRL> show configuration
Configuration - dg_config
Protection Mode: MaxPerformance
Members:
PRIMARY - Primary database
standby - Physical standby database
Fast-Start Failover: Disabled
Configuration Status:
SUCCESS (status updated 17 seconds ago)

Note: Our configuration is done for configure the DGMGRL on the Dataguard.

This entry was posted in Oracle on by .
Unknown's avatar

About SandeepSingh

Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

Leave a Reply