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
- Check the Status of Broker service parameter is enabled or disabled. ( Set both on Primary or Standby Database Server)
Show parameter dg_broker_startNote: return TRUE means Enabled or False means diabledshow parameter dg_broker_config_file1show parameter dg_broker_config_file2Check 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 ASPRIMARY DATABASE IS primary_dbCONNECT 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 configurationConfiguration - dg_config Protection Mode: MaxPerformance Members: PRIMARY - Primary database standby - Physical standby database Fast-Start Failover: DisabledConfiguration Status:SUCCESS (status updated 17 seconds ago)
Note: Our configuration is done for configure the DGMGRL on the Dataguard.