The Data Guard broker logically groups these primary and standby databases into a broker configuration that allows the broker to manage and monitor them together as an integrated unit. You can manage a broker configuration using either the Oracle Enterprise Manager graphical user interface or the Data Guard command-line interface.

To know more about it

Benefits of Using Data Guard Broker

The Oracle Data Guard broker is a distributed management framework that automates and centralizes the creation, maintenance, and monitoring of Data Guard configurations. The following list describes some of the operations the broker automates and simplifies:

  • Creating Data Guard configurations that incorporate a primary database, a new or existing (physical, logical, or snapshot) standby database, redo transport services, and log applies services, where any of the databases could be Oracle Real Application Clusters (RAC) databases.
  • Adding additional new or existing (physical, snapshot, logical, RAC or non-RAC) standby databases to an existing Data Guard configuration, for a total of one primary database, and from 1 to 30 standby databases in the same configuration.
  • Managing an entire Data Guard configuration, including all databases, redo transport services, and log applies services, through a client connection to any database in the configuration.
  • Managing the protection mode for the broker configuration.
  • Invoking switchover or failover with a single command to initiate and control complex role changes across all databases in the configuration.
  • Configuring failover to occur automatically upon loss of the primary database, increasing availability without manual intervention.
  • Monitoring the status of the entire configuration, capturing diagnostic information, reporting statistics such as the redo apply rate and the redo generation rate and detecting problems quickly with centralized monitoring, testing, and performance tools.

Before configuring data guard broker , let us see configuration and log files of data guard :

Broker configuration files are created and named when we start dg broker for first time.

The DMON process maintains persistent configuration data about all the databases in the broker configuration in a broker configuration file.Each database that is part of  dg broker either primary or standby will have 2 configuration files which are maintained and synchronized for every database.

One of the files is in use and the other acts as a backup. The configuration files are binary files and cannot be edited.

Default naming convention is dr1<db_unique_name>.dat .

We can check this files from parameter.

SQL> show parameter broker

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
dg_broker_config_file1		     string	 /appndb/oracle/product/12.1/db
						 _2/dbs/dr1mgr.dat
dg_broker_config_file2		     string	 /appndb/oracle/product/12.1/db
						 _2/dbs/dr2mgr.dat

We can change name of this files using alter system statement. But to change this we need to disable broker and stop DMON process.

Log file in Data Guard Broker :

As we know each background process is associated with one trace file ,DMON process is also having one trace file.

It is located in same directory as alert log file with following name :

drc<$ORACLE_SID>.log.

How to use Data Guard broker

[oracle@localhost ~]$ dgmgrl
DGMGRL for Linux: Version 11.2.0.4.0 - 64bit Production

Copyright (c) 2000, 2009, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.
DGMGRL>
DGMGRL> connect sys/oracle
Connected.
DGMGRL>
DGMGRL> show configuration verbose
ORA-16532: Data Guard broker configuration does not exist

Configuration details cannot be determined by DGMGRL

DGMGRL> CREATE CONFIGURATION DGCONFIG1 AS PRIMARY DATABASE IS MGR CONNECT IDENTIFIER IS MGR;
Configuration "dgconfig1" created with primary database "mgr"
DGMGRL> show configuration verbose

Configuration - dgconfig1

Protection Mode: MaxPerformance
Databases:
mgr - Primary database

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

Fast-Start Failover: DISABLED

Configuration Status:
DISABLED

Add Standby Database

DGMGRL> ADD DATABASE STD_MGR AS CONNECT IDENTIFIER IS STD_MGR;
Database "std_mgr" added
DGMGRL>
DGMGRL> show configuration verbose

Configuration - dgconfig1

Protection Mode: MaxPerformance
Databases:
mgr - Primary database
std_mgr - Physical standby database

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

Fast-Start Failover: DISABLED

Configuration Status:
DISABLED

Now, enable and check the configuration

DGMGRL> ENABLE CONFIGURATION;
Enabled.
DGMGRL> SHOW CONFIGURATION;

Configuration - dgconfig1

Protection Mode: MaxPerformance
Databases:
mgr - Primary database
std_mgr - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

DGMGRL>

Stay tuned for More articles on Oracle DataGuard

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Telegram Channel: https://t.me/helporacle

Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/

Joel Perez’s LinkedIn: Joel Perez’s Profile

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp

About The Author

Comments

  1. Naresh

    I have few question related to this post ::

    1) How to configure fsfo on broker .
    2) after broker setup, what would be impact on broker setup if we change dg configuration related parameter from sql prompt .
    3) If we have broker setup, how we can inform broker about db role change performed manually.
    4) what would be impact on database,if kill dmon (broker) process from os level .

  2. Vinay Magrania

    Hi Naresh,

    I’m so glad you asking something different questions. I’ll try to giving you the answer.

    1) How to configure fsfo on broker .
    Ans. https://oraclegurukul.blogspot.com/2014/07/enabling-fast-start-failover-and.html.

    2) after broker setup, what would be impact on broker setup if we change dg configuration related parameter from sql prompt
    Ans. you cannot alter DG parameters when the broker’s DMON process is running. If you want to change disable DGMGRL then change as you required and re-enable the DGMGRL as recommendation.

    3) If we have broker setup, how we can inform broker about db role change performed manually.
    Ans. If you change the db role manually like sql prompt. So getting “ORA-16816: incorrect database role” In That case re-configure DG Broker.
    A. Disabled the broker
    B. Delete existing broker configuration files
    C. Ensure the db roles
    D. Enable the broker on Primary and Standby.
    E. Create Configuration file
    F. Enable configuration.
    G. Verify

    4) what would be impact on database,if kill dmon (broker) process from os level.
    Ans. As my understanding if you kill the DMON process. Its not read the DG configuration file and not handshake b/w Primary and standby. So in that case no any action performed like switchover/Failover and some configuration changes etc.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.