Setting Up the Broker Configuration Files

Nel documento Oracle® Data Guard Broker 10g (pagine 39-42)

Managing Broker Configurations

3.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

Note the following restrictions when setting the DG_BROKER_CONFIG_FILE1 and DG_BROKER_CONFIG_FILE2 initialization parameters:

The parameters must be set to the same value for each instance if this is a RAC database.

These parameters can only be set or changed when the Data Guard broker is not running (DG_BROKER_START=FALSE).

These parameters must specify a raw device, ASM file, or cluster file system file that resolves to the same set of physical files for all RAC instances.

The Data Guard Broker works with databases that use either Oracle managed or user managed datafiles. These datafiles can reside on raw devices, a file system or an ASM disk group. The following section contains these topics:

Renaming the Broker Configuration Files

Managing Broker Configuration Files in a Real Application Clusters Environment

Primary

Setting Up the Broker Configuration Files

3.2.1 Renaming the Broker Configuration Files

You can change the configuration filenames dynamically by issuing the ALTER SYSTEM SQL statement. However, you cannot alter these parameters when the broker’s 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 DGMGRL DISABLE command. See Section 3.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

4. If the configuration files are not located 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. If the files are located on raw devices, you must manually move the contents from the old location to the new location.

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 DGMGRL ENABLE command or the Enable operation in the Data Guard management pages of the Enterprise Manager.

3.2.2 Managing Broker Configuration Files in a Real Application Clusters Environment

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. The configuration files can be deployed using one of the following methods:

Using Cluster File System (CFS) for Configuration Files

Using ASM Disk Groups for Configuration Files

Using Raw Devices for Configuration Files

3.2.2.1 Using Cluster File System (CFS) for 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 3–2 shows the set up for the broker

configuration files on CFS. In this scenario, the parameters and value for all instances would be:

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.

Setting Up the Broker Configuration Files

Figure 3–2 Broker Configuration Setup in a CFS Area

3.2.2.2 Using ASM Disk Groups for Configuration Files

The broker's configuration files can also reside on an ASM disk group. Figure 3–3 shows the setup for the broker configuration files on ASM devices. In this scenario, the parameters and values would be specified, as follows:

ALTER SYSTEM SET DG_BROKER_CONFIG_FILE1 = '+DG/DIRECTORY/DR1.DAT' SCOPE=BOTH;

ALTER SYSTEM SET DG_BROKER_CONFIG_FILE2 = '+DG/DIRECTORY/DR2.DAT' SCOPE=BOTH;

Figure 3–3 Broker Configuration Setup with ASM

Because the configuration files must be explicitly named by the user, these configuration files are not Oracle Managed Files (OMF).

To create the broker's configuration files on an ASM disk group, set the DG_BROKER_

CONFIG_FILE1 and DG_BROKER_CONFIG_FILE2 initialization parameters to a string value that includes the name of an existing ASM disk group, an existing directory in that disk group, and the name of the configuration file itself.

RAC Database

DG_BROKER_CONFIG_FILE1

DG_BROKER_CONFIG_FILE2

DG_BROKER_CONFIG_FILE1 DG_BROKER_CONFIG_FILE2

DG_BROKER_CONFIG_FILE1

DG_BROKER_CONFIG_FILE2

CFS area:

dr1db_unique_name.dat

dr2db_unique_name.dat

$ORACLE_BASE/admin/db_unique_name/

Instance "inst1"

Instance "inst2"

Instance "inst3"

Starting the Data Guard Broker

3.2.2.3 Using Raw Devices for Configuration Files

If CFS is not available and you are not using ASM, 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 3–4 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 on each node:

%ln -s /dev/rdsk/c1t2d3s5 dr1/<db_unique_name>.dat

%ln -s /dev/rdsk/c1t2d3s6 dr2/<db_unique_name>.dat

Figure 3–4 Broker Configuration Setup with 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.

Nel documento Oracle® Data Guard Broker 10g (pagine 39-42)