Skip to content

Data Guard Broker basics

The Data Guard broker logically groups primary and standby databases in a Data Guard setup 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.

Data Guard Broker is part of the normal Oracle Database Enterprise Edition installation and an integral part of Data Guard. You can do Data Guard related configuration, set transport methods, apply setup and role change services and also change overall protection mode.

The Broker consists of three major parts:

A) BACKGROUND PROCESSES ON EACH NODE

B) BROKER CONFIGURATION FILES

C) COMMAND LINE INTERFACE KNOWN AS DGMGRL.


 

A) BACKGROUND PROCESSES ON EACH NODE

All of the processes run on every node of Data Guard setup.

i) Data Guard Monitor (DMON)

  • Coordinates all Broker actions as well as maintains the Broker configuration files
  • Enabled or disabled with the DG_BROKER_START parameter.

ii) Broker Resource Manager (RSM)

  • RSM process comes in play whenever broker need to run any SQL command in the database.
  • SQL may be required to be run during Data Guard setup or because of result of a change to the configuration made through DGMGRL

 

iii) Data Guard Net Server (NSVn)

  • NSV processes are responsible for making connection with the remote database and to send across any work items to the remote database.
  • So, DMON or RSM process may ask NSV process to connect to other node for any work request. DMON may need to send some communication to the other node and RSM may have to get some data through SQL from other node.

iv) DRCn

  • NSV processes contact DRC process running on other node to establish the connection, so DRC process acts like a receiver on other node.
  • Each NSV process will have a partner DRC process on the target database, which will perform the actual work on behalf of the source database NSV process and return the results or status.

 

v) Internode servers (INSVs)

If Data Guard setup involves Real Application Clusters (RAC), INSV process come into play. It maintain a connection between the RAC database nodes in the cluster to ensure that the Broker on each node knows the state of the cluster.

 

WHAT HAPPENS AT DATABASE STARTUP:

Step 1) Primary database startup.

Step 2) DMON process at primary ask local NSV process to connect to each standby database.

Step 3) NSV process in turn will contact DRC process on standby and get confirmation.

Step 4) DMON process at primary will then ask local RSM to send the setup commands to the standby database.

Step 5) RSM will send the setup commands to NSV.

Step 6) NSV process in turn will contact DRC process on standby to run the setup commands.

 

B) BROKER CONFIGURATION FILES

Broker keeps its configuration details in flat file. The files are stored at each database nodes in the Data Guard configuration.
Additionally two copies of the configuration files are always stored on each database for redundancy.

Below parameters control where the configuration files will be stored.

DG_BROKER_CONFIG_FILE1
DG_BROKER_CONFIG_FILE2

For RAC instances, you need to keep the files in shared location where all database instances can access it.

Broker keeps in sync all of these configuration files but DMON process running on the primary database is the owner of the master copy of the files.
This means that if you started the standby database while Data guard process are down at primary node, then no data guard related activities will be done until the standby database can connect to the primary database

Primary purpose of keeping configuration files on each node is when your primary node is gone and you need to failover, Data Guard processes can determine the original settings for the entire configuration from the configuration files on other surviving node.

 

C) COMMAND LINE INTERFACE (CLI) KNOWN AS DGMGRL

The third important part of Broker setup is the interface through which users will interact with Broker. The Broker CLI DGMGRL is included in the Oracle Database Enterprise Edition

To access DGMGRL, type dgmgrl at the command prompt. Use the CONNECT command after you have started DGMGRL to connect to databases.

 

[Post Views: 4020]

Brijesh Gogia

I’m an experienced Oracle Applications DBA with more than a decade of full-time DBA experience. I have gained a wide knowledge of the Oracle software stack and have worked on several big projects for multi-national companies. I enjoy working with the leading-edge technology and have passion for database performance and stability. Thankfully my work allows me time for researching new technologies (and to write about them).
  
You can connect with me on LinkedIn.

Be First to Comment

Leave a Reply

Required fields are marked *

error: Alert: Content is protected !!