This is an old revision of the document!
Table of Contents
Data Guard Broker
Configuration
Example below …
Primary Database: DUBETECH01 on DBOR01
Standby Database: DUBETECH02 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\DR1LIBSOUAT.DAT’; SQL> alter system set dg_broker_config_file2 = ‘D:\oracle\product\11.2.0\dbhome_1\database\DR2LIBSOUAT.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 = LIBSOUAT_DGMGRL) (ORACLE_HOME = D:\oracle\product\11.2.0\dbhome_1) (SID_NAME = LIBSOUAT) ) )
Now use DGMGRL to create the configuration:
DGMGRL> CREATE CONFIGURATION 'DG_LIBSOUAT' as PRIMARY DATABASE is LIBSOUAT CONNECT IDENTIFIER is libsouat; DGMGRL> ADD DATABASE libsouat2 as CONNECT IDENTIFIER is libsouat2 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 © 2000, 2009, Oracle. All rights reserved.
Welcome to DGMGRL, type “help” for information. DGMGRL> connect sys/<password>@libsouat Connected. DGMGRL>Show Current Configuration DGMGRL> show configuration;
Configuration - DG_LIBSOUAT
Protection Mode: MaxPerformance Databases: libsouat - Primary database libsouat2 - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status: SUCCESSShow Summary of Database Information DGMGRL> show database libsouat2;
Database - libsouat2
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): libsouat2
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 …
Use of Oracle Enterprise Manager to monitor Standby configurations. Use of DGMGRL command line program to quickly view/configure settings Easier to view errors associated with the Standby databases. Simplify switchovers and failovers No need to put standby database into recovery mode, the broker does this automatically when database is mounted