Table of Contents

Data Guard Broker

Configuration

Example below …

Primary Database: DUBEPRD on DBOR01
Standby Database: DUBESDBY on DBOR02

On the Physical and Standby database set the following initialisation parameters:

SQL> alter system set dg_broker_config_file1 = ‘D:\oracle\product\11.2.0\dbhome_1\database\DR1DUBEPRD01.DAT’;
SQL> alter system set dg_broker_config_file2 = ‘D:\oracle\product\11.2.0\dbhome_1\database\DR2DUBEPRD02.DAT’;
SQL> alter system set dg_broker_start = TRUE;

Add a static registration to the listener.ora file on both the primary and standby servers
For example …

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = DUBEPRD_DGMGRL)
      (ORACLE_HOME = D:\oracle\product\11.2.0\dbhome_1)
      (SID_NAME = DUBEPRD)
    )
  )

Now use DGMGRL to create the configuration:

DGMGRL> CREATE CONFIGURATION 'DG_DUBEPRD' as PRIMARY DATABASE is DUBEPRD CONNECT IDENTIFIER is dubeprd;
DGMGRL> ADD DATABASE dubesdby as CONNECT IDENTIFIER is dubesdby MAINTAINED AS PHYSICAL;
DGMGRL> ENABLE CONFIGURATION;
DGMGRL> SHOW CONFIGURATION;

It is possible the output from “show configuration” may show the following warnings …

ORA-16789: Standby redo logs not configured

See here for instructions on adding Standby Redo logs.

ORA-16857: Standby disconnected from redo source for longer than specified threshold

Can be ignored (it will eventually reset itself) or set a higher threshold for parameter TransportDisconnectedThreshold

Monitoring

Connect to DGMGRL When connecting to DGMGRL always connect using the password. Otherwise errors can occur when performing switchovers and failovers.

D:\>dgmgrl
DGMGRL for 64-bit Windows: Version 11.2.0.4.0 - 64bit Production

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

Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/<password>@dubeprd
Connected.
DGMGRL>

Show Current Configuration

DGMGRL> show configuration;

Configuration - DG_DUBEPRD

  Protection Mode: MaxPerformance
  Databases:
    dubeprd   - Primary database
    dubesdby  - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

Show Summary of Database Information

DGMGRL> show database dubesdby;

Database - dubesdby

  Role:            PHYSICAL STANDBY
  Intended State:  APPLY-ON
  Transport Lag:   0 seconds (computed 0 seconds ago)
  Apply Lag:       0 seconds (computed 0 seconds ago)
  Apply Rate:      84.00 KByte/s
  Real Time Query: OFF
  Instance(s):
    dubesdby

Database Status:
SUCCESS

Switchover and Failover

With the Broker this is very simple.
If the configuration is correct you can use the commands below, substituting for the Physical Standby name shown in the Configuration.

DGMGRL> SWITCHOVER TO <database-name>;
DGMGRL> FAILOVER TO <database-name>;

Licensing

The broker is included for use in Enterprise editions of the Oracle Database, therefore there are no additional licensing concerns.
The following information is from Oracle's Documentation on the Broker …
The broker's interfaces improve usability and centralize management and monitoring of the Data Guard configuration. Available as a feature of the Enterprise Edition and Personal Edition of the Oracle database, the broker is also integrated with the Oracle database and Oracle Enterprise Manager.

Benefits

The full list of benefits can be seen here: http://docs.oracle.com/cd/E11882_01/server.112/e41134/concepts.htm#SBYDB4709

A summary of these benefits are …