We will see how we can configure Data Guard Broker to monitor standby database. With the help of Broker, we can create and monitor databases in the data guard configuration.
Ensure that database parameter dg_broker_start is set to false. Remove existing broker configuration files. See here how to remove the existing broker configuration files safely.
The below show parameter dg_broker_config_file shows how we can identify the existing broker configuration files.
SQL> show parameter dg_broker_config_file NAME TYPE VALUE ------------------------- ---------- ---------------------------------------------------- dg_broker_config_file1 string /u03/app/oracle/product/11.2.0/db3/dbs/dr1voice.dat dg_broker_config_file2 string /u03/app/oracle/product/11.2.0/db3/dbs/dr2voice.dat
Remove both the configuration files
Now, enable data guard broker process. It is done using below command :
Once we set dg_broker_start to TRUE, we can see the process dmon running
Stop the listener to edit listener.ora entries to add static entry GLOBAL_DBNAME = <DB_UNIQUE_NAME>_DGMGRL
Edit listener.ora to add GLOBAL_DBNAME = <DB_UNIQUE_NAME>_DGMGRL
SID_LIST_LISTENER_VOICE =
(sid_list =
(sid_desc =
(GLOBAL_DBNAME = voice_dgmgrl)
(ORACLE_HOME = /u03/app/oracle/product/11.2.0/db3)
(SID_NAME = voice)
)
)
LISTENER_VOICE =
(DESCRIPTION =
(ADDRESS =
(HOST = 192.168.1.7)
(PORT = 1522)
(PROTOCOL = tcp)
)
)
Start the listener
We notice that the value of GLOBAL_DBNAME appears as the the service name
Change in listener.ora calls for a change in soure tnsname.ora entry as below
voice =
(description =
(address =
(host=192.168.1.7)(port = 1522)(protocol=tcp)
)
(connect_data =
(server = dedicated)
(service_name= voice_dgmgrl)
)
)
Start dgmgrl
$ . oraenv orcl $ 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>
Create configuration using create configuration command as below :
dgmgrl> create configuration "<configuration name>" primary database is "<DB_UNIQUE_NAME of primary database>" connect identifier is <connect identifier to primary database>;
Now, lets add physical standby database to the broker configuation :
dgmgrl> add database "<DB_UNIQUE_NAME of standby database>" as connect identifier is "<connect identifier to standby database>";
Setting up the configuration is not sufficient for the broker to work. We need to enable the confuguration with below command :
To see the configuration settings, use the below command :