Data Guard configuration consists of one primary database and up to thirty standby databases. The databases in a Data Guard configuration are connected by Oracle Net and may be dispersed geographically. There are no restrictions on where the databases are located as long as they can communicate with each other. For example, you can have a standby database on the same system as the primary database, along with two standby databases on another system.
The Data Guard broker logically groups these primary and standby databases into a broker configuration that allows the broker to manage and monitor them together as an integrated unit.
Dataguard Broker Prerequisites
The following conditions must be true before you can use the broker:
- The primary and standby databases must be running on same version of Oracle Database. The database must be licensed for Oracle Enterprise Edition or Personal Edition.
- Both the database must be using server parameter file (SPFILE).
- The value of the DG_BROKER_START initialization parameter must be set to TRUE.
- Standby redo logs must be configured on the primary and standby databases. You must stop log apply services prior to configuring standby redo logs
- 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 concatenation of db_unique_namedb_domain. For example, in the LISTENER.ORA file:
LISTENER = (DESCRIPTION = (ADDRESS_LIST= (ADDRESS= (PROTOCOL=tcp) (HOST=host_name) (PORT=port_num)))) SID_LIST_LISTENER= (SID_LIST= (SID_DESC= (SID_NAME=sid_name) (GLOBAL_DBNAME=db_unique_name_DGMGRL.db_domain) (ORACLE_HOME=oracle_home)))
PARAMETER_NAME | VALUE_OF_PRIMARY | VALUE_OF_STANDBY |
db_name | ecpix | ecpix |
db_unique_name | ecpix | ecpixsch |
fal_client | ecpix1 | ecpixsch1 |
fal_server | ecpixsch1 | ecpix1 |
Oracle Version | 11.2.0.4.0 | 11.2.0.4.0 |
Creating the Broker Configuration
- Invoke DGMGRL and connect to your primary database. Enter your password for SYS.
bash-3.00$ dgmgrl DGMGRL for Solaris: 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: Connected. DGMGRL>
- Create the broker configuration including a profile for the primary database.
DGMGRL> create configuration 'DGConfig1' as primary database is 'ecpix' connect identifier is ecpix1; Configuration "DGConfig1" created with primary database "ecpix" DGMGRL>
- Display information about the configuration.
DGMGRL> show configuration Configuration - DGConfig1 Protection Mode: MaxPerformance Databases: ecpix - Primary database Fast-Start Failover: DISABLED Configuration Status: DISABLED DGMGRL>
- Use the following commands to add your physical standby database to the broker configuration.
DGMGRL> add database 'ecpixsch' as connect identifier is ecpixsch1; Database "ecpixsch" added DGMGRL>
- Use the SHOW CONFIGURATION command to verify that the standby1 database was added to the configuration.
DGMGRL> show configuration Configuration - DGConfig1 Protection Mode: MaxPerformance Databases: ecpix - Primary database ecpixsch - Physical standby database Fast-Start Failover: DISABLED Configuration Status: DISABLED DGMGRL>
Enabling the Broker Configuration
With the Data Guard environment set successfully for your primary and standby databases, you can now enable the broker configuration.
- Enable the entire configuration. This may take some time to complete.
DGMGRL> enable configuration Enabled.
- Verify that the configuration was successfully enabled.
DGMGRL> show configuration Configuration - DGConfig1 Protection Mode: MaxPerformance Databases: ecpix - Primary database ecpixsch - Physical standby database Fast-Start Failover: DISABLED Configuration Status: SUCCESS
In later part will be sharing Switchover and Failover steps for Oracle Dataguard using DGMGRL console.