Skip Headers

Oracle® Data Guard Broker
10g Release 1 (10.1)

Part Number B10822-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

2 Managing Broker Configurations

This chapter contains the following sections:

2.1 Configuration Support

The broker enables you to logically define a Data Guard configuration, consisting of a primary database and physical and logical standby databases. With the broker, you define a broker configuration that is a logical grouping of the databases, including log transport services and log apply services. At the DBA's discretion, the broker controls the logical objects in the configuration, modifies their behavior at runtime, monitors the overall health of the configuration, and reports any health and other operational characteristics up through the Oracle Enterprise Management notification mechanisms if you are using the Data Guard GUI, or through SHOW commands if you are using the CLI.

The broker supports Data Guard configurations consisting of a primary database, and up to nine standby databases that are either local to, or, remote from, the primary database, and any of those databases can be an Oracle Real Application Clusters (RAC) database.

A supported Data Guard configuration contains the following components:

The standby database is updated with redo data that is transmitted automatically from the primary database by log transport services. The archived redo log file and standby redo log file contain all of the database changes except for unrecoverable or unlogged changes. On the standby database, log apply services apply the archived redo log files to stay synchronized with the primary database. Thus, the standby database can take over operations if the primary database becomes unusable.

The broker's DMON process configures and maintains the broker configuration as a group of objects that you can manage and monitor as a single unit. Thus, when you enter a command that affects multiple databases, the DMON process:

The DMON process enables you to configure, monitor, and control the databases and the configuration together as a unit. If the configuration is disabled, broker management of all of the databases in the configuration is also disabled. If you later request the configuration to be enabled, broker management is enabled for each database in the configuration.

Figure 2-1 shows a two-database broker configuration with the Data Guard monitor (DMON) process running at each location.

Figure 2-1 Oracle Data Guard Broker Configuration

Description of odg_arch.gif follows
Description of the illustration odg_arch.gif

Table 2-1 provides a comparison of configuration management using the broker's interfaces and using SQL*Plus.

Table 2-1 Configuration Management With and Without the Broker


With the Broker Without the Broker
General Provides primary and standby database management as one unified configuration. You must manage the primary and standby databases separately.
Standby Database Creation Provides the Data Guard GUI wizards that automate and simplify the steps required to create a configuration with an Oracle database on each site, including creating the standby control file, online redo log files, datafiles, and server parameter files. You must manually:
  • Copy the database files to the standby database.

  • Create a control file on the standby database.

  • Create server parameter or initialization parameter files on the standby database.

Configuration and Management Enables you to configure and manage multiple databases from a single location and automatically unifies all of the databases in the broker configuration. You must manually:
  • Set up log transport services and log apply services on each database in the configuration.

  • Manage the primary database and standby databases individually.

Control
  • Automatically set up log transport services and log apply services. Simplify management of these services, especially within a RAC database environment.
  • Automates switchover and failover.

  • Automates CRS service and instance management over database role transitions.

  • Provides mouse-driven database state changes and a unified presentation of configuration and database status.

  • Provides mouse-driven property changes.

You must manually:
  • Use many separate SQL*Plus statements to manage the database.

  • Coordinate sequences of multiple commands across multiple database sites to execute operations.

  • Coordinate sequences of multiple commands to disable CRS management of services and instances, to execute role transitions, then to reenable CRS management of instances and services that are to be available after the role transitions.

Monitoring
  • Provides continuous monitoring of the configuration health, database health, and other runtime parameters.
  • Provides a unified updated status and detailed reports.

  • Provides an integrated tie-in to Oracle Enterprise Manager events.

You must manually:
  • Monitor the status and runtime parameters using fixed views on each database—there is no unified view of status for all of the databases in the configuration.

  • Provide a custom method for monitoring Oracle Enterprise Manager events.


2.2 Setting Up the Broker Configuration Files

Two copies of the configuration file are maintained for each database so as to always have a record of the last known valid state of the configuration. When the broker is started for the first time, the configuration files are automatically created and named using a default path name and filename that is operating-system specific. You can override this default path name and filename by setting the following initialization parameters for that database:

DG_BROKER_CONFIG_FILE1
DG_BROKER_CONFIG_FILE2

If the broker is managing a RAC database, the value of DG_BROKER_CONFIG_FILE1 and the value of DG_BROKER_CONFIG_FILE2 for each of the instances must point to the same set of physical files. In other words, all instances of the database must reference the same set of configuration files. If cluster file system (CFS) is available, and the configuration files reside there, the DG_BROKER_CONFIG_FILEn parameters on all of the instances must be set to these files including the path to the CFS area. Figure 2-2 shows the set up for the broker configuration files on CFS. In this scenario, the parameters and value for all instances would be:

DG_BROKER_CONFIG_FILE1=$ORACLE_BASE/admin/db_unique_name/dr1db_unique_name.dat
DG_BROKER_CONFIG_FILE2=$ORACLE_BASE/admin/db_unique_name/dr2db_unique_name.dat

Figure 2-2 Broker Configuration Setup in a CFS Area

Description of cfs_setup.gif follows
Description of the illustration cfs_setup.gif

If CFS is not available, the files must be on raw devices. In this case, the parameter values on each of the instances must point to the raw devices. Figure 2-3 shows the set up for the broker configuration files on raw devices. On a UNIX system, you would set this up similar to the following:

%ln -s /dev/rdsk/c1t2d3s5 dr1instn.dat

Figure 2-3 Broker Configuration Setup With Raw Device

Description of raw_device_setup.gif follows
Description of the illustration raw_device_setup.gif

You can change the configuration filenames dynamically by issuing the ALTER SYSTEM SQL statement. However, you cannot alter these parameters when the DMON process is running. To change the names of these configuration files for a given database, perform the following steps:

  1. Disable the broker configuration using the CLI DISABLE command. See Section 2.5.

  2. Stop the Data Guard broker DMON process using the following SQL statement:

    SQL> ALTER SYSTEM SET DG_BROKER_START=FALSE;
    
    
  3. Change the configuration filenames for the database:

    SQL> ALTER SYSTEM SET DG_BROKER_CONFIG_FILE1=filespec1
    SQL> ALTER SYSTEM SET DG_BROKER_CONFIG_FILE2=filespec2
    

    Note:

    If the broker is managing a RAC database, the value of DG_BROKER_CONFIG_FILE1 and the value of DG_BROKER_CONFIG_FILE2 for each of the instances must point to the same set of physical files.

  4. If not on raw devices, rename the existing files to filespec1 and filespec2, respectively, at the operating system level to avoid losing the existing broker configuration information.

  5. Restart the Data Guard broker DMON process, as follows:

    SQL> ALTER SYSTEM SET DG_BROKER_START=TRUE;
    
    
  6. Enable the broker configuration using the CLI ENABLE command or the Enable operation in the Data Guard GUI.

2.2.1 Sizing for Raw Devices

If the broker configuration files need to be on raw devices, set up two additional raw devices of 1MB each. Set up the value of the DG_BROKER_CONFIG_FILE1 and DG_BROKER_CONFIG_FILE2 parameters to point to the raw devices. A 1MB configuration file will accommodate 10 databases with a total of 45 instances between them.

You may need a larger device if the number of instances for this configuration exceeds 45 instances. You will need 15KB for each additional instance.

2.3 Starting the Data Guard Broker

After setting up the configuration files, the DG_BROKER_START initialization parameter must be set to TRUE for each database to start the Data Guard monitor (DMON) processes.

By default, the DG_BROKER_START initialization parameter is set to FALSE. However, you can set the value in the following ways:

Whether you use the Data Guard GUI or the CLI, set the DG_BROKER_START=TRUE initialization parameter in the server parameter file on each primary and standby database. Doing so ensures that the DMON processes will start automatically the next time you start any instance of the database.

2.4 Management Cycle of a Broker Configuration

The broker helps you to create a new configuration or manage an existing configuration. Figure 2-4 shows the life cycle of a broker configuration.

Figure 2-4 Life Cycle of a Broker Configuration and Its Databases

Description of lifecycl.gif follows
Description of the illustration lifecycl.gif


Create the Broker Configuration

When using the Data Guard GUI, the Add Standby Database wizard can either add an existing (RAC or non-RAC) standby database into the configuration or create a new (non-RAC only) standby database and add it to the configuration. The standby database can be either a physical or logical database.

When using the CLI, the primary database and a standby database must already exist. You construct the standby database from backups of the primary database control files and datafiles, and then prepare it for recovery.


See Also:

Chapter 5 and Chapter 6 which describe the preparation requirements if you are using the Data Guard GUI or the CLI, respectively


Enable the Broker Configuration

A Data Guard configuration must be enabled to be managed or monitored by the broker. Conversely, you disable a configuration if you no longer want to manage it with the broker. When you disable a configuration, broker management of all of its databases is also disabled.


Note:

You can enable or disable the configuration using the CLI. You cannot disable the configuration using the Data Guard GUI. You can enable the configuration using the Data Guard GUI in the event that it was previously disabled using the CLI.

A broker configuration, when first created using the Data Guard GUI, is automatically enabled as soon as the Add Standby Database wizard completes.

A broker configuration, when first created using the CLI, is in a disabled condition. This means its constituent databases are not yet under active control of the Data Guard monitor. When you finish configuring the databases into a broker configuration with the CLI, you must enable the configuration to allow the Data Guard monitor (DMON) process to manage the configuration.

You can enable:

You can easily disable a database if a problem occurs and you can no longer function properly in the broker configuration.

You may also want to disable a configuration temporarily, and then change some properties in the broker configuration without affecting the actual database properties. The changed properties will take effect when the configuration is enabled again for management by the broker.


Make Role Changes Within the Broker Configuration, As Needed

At any time, you can issue a single command to change the roles of the databases in the configuration. If some event renders the primary database unusable, you can fail over one of the standby databases to become the new primary database.

In addition, planned downtime for maintenance can be reduced because you can quickly switch over production processing from the current primary database to a standby database, and then switch back again after the planned maintenance.


See Also:

Chapter 4 for more information about role changes


Make State Changes to the Databases, As Needed

The Data Guard broker transitions the databases into an online state, by default, the first time that you enable the database.

At any time, you can issue a single command through the Data Guard GUI or the CLI to change the state of the database. For example, you could bring the primary database into a LOG-TRANSPORT-OFF state to temporarily stop archiving log files to the standby database. Then, you issue another command to return the database to a full online state (that is, online and archiving log files to the standby databases).


See Also:

Chapter 3 for more information about database state changes


Update Database Properties, As Needed

The Data Guard broker enables you to set database properties, some of which correspond to database initialization parameters. You can change these properties to dynamically control such things as log transport, file management, log apply, and to support the overall configuration protection mode. The broker records the changes in the broker configuration file for each database in the Data Guard configuration and propagates the changes to the related initialization parameters in the server parameter files, if needed.


See Also:

Chapter 3 and Chapter 8 for complete information about database properties


Set Data Protection Levels, As Needed

The Data Guard broker enables you to set the data protection level for the configuration. You can configure the protection mode to maximize data protection, maximize availability, or maximize performance.


See Also:

Section 3.6 for information about managing data protection modes


Monitor the Configuration

You can check the health of the configuration, display and update the properties of the databases, and set Oracle Enterprise Manager events.

The Data Guard GUI also provides a dynamic performance page that automatically and dynamically refreshes chart data and status at specified intervals. The performance chart shows a graphical summary of how far behind and how much redo data is being generated and applied.


See Also:

Chapter 5 and Chapter 6 for scenarios that show examples using the Data Guard GUI and the CLI, respectively

2.5 Enable and Disable Operations

A key concept of management with the broker is the notion of enabling and disabling broker management of the databases in a broker configuration. The enable and disable operations are defined for databases that were incorporated into a broker configuration; you cannot perform these broker operations on the physical components of a Data Guard configuration, nor on databases that are not part of the broker configuration. This is because when you enable or disable a database in the broker configuration, you are effectively enabling or disabling the ability of the Data Guard monitor (DMON) process to:

However, disabling a broker configuration does not affect current services and operations in the actual Data Guard configuration. For example, when you disable a broker configuration, log transport services and log apply services in the Data Guard configuration continue to function unchanged, but you can no longer manage them through the broker interfaces.

In addition, disabling a database does not remove or delete its profile from the broker configuration file. You can reenable your ability to manage with the broker using the CLI ENABLE CONFIGURATION or ENABLE DATABASE commands, or the Enable option in the Data Guard GUI.


Note:

You can enable or disable the configuration using the CLI. You cannot disable the configuration using the Data Guard GUI. You can enable the configuration using the Data Guard GIUI in the event that it was previously disabled using the CLI.


Caution:

If you disable broker management of a standby database in the broker configuration, that standby database cannot be used by the broker as a failover target in the event of loss of the primary database.

Disabling broker management of the configuration may be useful to do even though you are removing the broker's ability to monitor and control the databases. For example, it may be advantageous to disable a configuration temporarily in order to change one or more properties in the broker configuration all at the same time. When you change properties in a disabled configuration, it does not affect the actual database properties underneath because the changes are not applied to the running database until you reenable the configuration. For example, you might want to change the overall configuration protection mode and the log transport services properties on a disabled configuration so that all changes are applied to the configuration at the same time upon the next enable operation.


Note:

For Oracle9i users, the configuration object is in either an online or offline state. For Oracle Database 10g users, the configuration object is always in an online state.

2.6 Configuration Status

A configuration status reveals the overall health of the configuration. Status of the configuration is acquired from the status of all of its databases.

The following list describes the possible status modes for a configuration: