DATA GUARD BROKER

 Distributed management framework that automates and centralizes the creation, maintenance, and monitoring of Data Guard configurations

 Create and enable Data Guard configurations, including setting up redo transport services and log apply services

 Manage an entire Data Guard configuration from any system in the configuration

 Manage and monitor Data Guard configurations that contain Real Application Clusters primary or standby databases

 Management operations can be performed locally or remotely through easy-to-use interfaces:


DMON - maintain config files
DRC - recieve network config
NSV - send network config
RSM - execute sql on db


Data Guard Brokerís command-line interface is DGMGRL


Creating DG Broker Configuration

Prerequisites

Before you perform this, you should setup the physical standby

Setting the DG_BROKER_START Initialization Parameter

In this task, you set the DG_BROKER_START initialization parameter to TRUE for your primary database and physical standby database.

1. Connect to your primary database and set the value of DG_BROKER_START using:
ALTER SYSTEM SET dg_broker_start = true;

2. Now connect to your physical standby database and set the value of DG_BROKER_START using:
ALTER SYSTEM SET dg_broker_start = true;
Creating the Service for the Listener

In this task you define a service for the listener that includes the db_unique_name_DGMGRL.db_domain values for the GLOBAL_DBNAME.

1. To enable DGMGRL to restart instances during the course of broker operations, a service with a specific name must be statically registered with the local listener of each instance. The value for the GLOBAL_DBNAME attribute must be set to a concatenati*on of <db_unique_name>_DGMGRL.<db_domain>.

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dbaloungeapps.com)(PORT = 1810))
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = DBALDB)
(ORACLE_HOME= /u03/wlireo/Oracle/11g)
(SID_NAME = DBALDB)
)
(SID_DESC =
(GLOBAL_DBNAME = DBALDB_STBY)
(ORACLE_HOME= /u03/wlireo/Oracle/11g)
(SID_NAME = DBALDB_STBY)
)
(SID_DESC =
(GLOBAL_DBNAME = DBALDB_DGMGRL)
(ORACLE_HOME= /u03/wlireo/Oracle/11g)
(SID_NAME = DBALDB)
)
(SID_DESC =
(GLOBAL_DBNAME = DBALDB_STBY_DGMGRL)
(ORACLE_HOME= /u03/wlireo/Oracle/11g)
(SID_NAME = DBALDB_STBY)
)
(SID_DESC =
(GLOBAL_DBNAME = DBALDB_DGB)
(ORACLE_HOME= /u03/wlireo/Oracle/11g)
(SID_NAME = DBALDB)
)
(SID_DESC =
(GLOBAL_DBNAME = DBALDB_STBY_DGB)
(ORACLE_HOME= /u03/wlireo/Oracle/11g)
(SID_NAME = DBALDB_STBY)
)
(SID_DESC =
(GLOBAL_DBNAME = DBALDB_XPT)
(ORACLE_HOME= /u03/wlireo/Oracle/11g)
(SID_NAME = DBALDB)
)
(SID_DESC =
(GLOBAL_DBNAME = DBALDB_STBY_XPT)
(ORACLE_HOME= /u03/wlireo/Oracle/11g)
(SID_NAME = DBALDB_STBY)
)
)
2. Reload the listener using the lsnrctl reload command.
Verify the new listener configuration using the lsnrctl status command. The service list should include entries for DBALDB_STBY_DGMGRL and DBALDB_DGMGRL:

Creating the Broker Configuration

In this task you create a Data Guard Broker configuration.

1. Invoke DGMGRL and connect to your primary database. Enter your password for SYS.


$ dgmgrl
DGMGRL for Linux: Version 11.2.0.1.0 - 64bit Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/Welcome1
Connected.
DGMGRL>

2. Create the broker configuration including a profile for the primary database.


DGMGRL> create configuration 'dgconfig1' as primary database is 'DBALDB' connect identifier is 'DBALDB';
3. Use the SHOW CONFIGURATION command

4. Use the following commands to add your physical standby database to the broker configuration.


DGMGRL> add database 'DBALDB_STBY' as connect identifier is 'DBALDB_STBY';
5. Use the SHOW CONFIGURATION command to verify that the DBALDB_STBY database was added to the configuration.


DGMGRL> show configuration;

Configuration - dgconfig1

Protection Mode: MaxPerformance
Databases:
DBALDB - Primary database
DBALDB_STBY - Physical standby database (disabled)

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

Enabling the Broker Configuration

With the Data Guard environment set successfully for your primary and standby databases, you can now enable the broker configuration.

1. Enable the entire configuration. This may take some time to complete.

DGMGRL> enable configuration;
Enabled.
DGMGRL>
2. Verify that the configuration was successfully enabled.


DGMGRL> show configuration;
Configuration - dgconfig1
Protection Mode: MaxPerformance
Databases:
DBALDB - Primary database
DBALDB_STBY - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS