Managing the Observer

Nel documento Oracle® Data Guard Broker 10g (pagine 101-104)

Switchover and Failover Operations

Step 5 Reinstate the former primary database as a new standby database

5.5.6 Managing the Observer

The observer is integrated in the DGMGRL client-side component and runs on a different computer from the primary or standby databases and from the computer where you manage the broker configuration. The observer continuously monitors the fast-start failover environment to ensure the primary database is available (described in Section 5.5.2.1). The observer’s main purpose is to enhance high availability and lights out computing by reducing the human intervention required by the manual failover process that can add minutes or hours to downtime.

You can manage the observer through either the Data Guard Overview pages in Oracle Enterprise Manager or using DGMGRL commands. Figure 5–2 shows how the

observer monitoring a fast-start failover configuration.

Figure 5–2 The Observer in the Fast-Start Failover Environment

The following sections provide information about managing the observer:

Installing and Starting the Observer

Viewing Information About the Observer

What Happens if the Observer Fails?

Stopping the Observer

Moving the Observer to Another Computer

How the Observer Maintains Fast-Start Failover Configuration Information

5.5.6.1 Installing and Starting the Observer

The observer should be installed and run on a computer system that is separate from the primary and standby systems. Installing and starting the observer is an integral part of enabling fast-start failover and is described in detail in these sections:

Section 2.1 describes installing Oracle Database Enterprise Edition or Oracle Personal Edition on the observer system.

Section 5.5.2 describes how to start the observer as a part of the step-by-step process to enable fast-start failover. Examples for starting the observer through Oracle Enterprise Manager and DGMGRL are included in Section 6.4 and Section 7.6, respectively.

Fast-Start Failover

There can be only one observer monitoring the broker configuration. If you attempt to start another one, the broker returns the following error message:

ORA-16647: could not start more than one observer

To start the observer, you must be able to login to DGMGRL as SYS. The observer is an OCI client that connects to the primary and target standby databases using the same SYS credentials you used when you connected to the Data Guard configuration with DGMGRL.

5.5.6.2 Viewing Information About the Observer

You can find information about the observer by querying the following columns in the V$DATABASE view:

FS_FAILOVER_OBSERVER_HOST shows the name of the computer on which the observer is running

FS_FAILOVER_OBSERVER_PRESENT shows whether or not the observer is connected to the local database

For example, to determine if fast-start failover can occur, the FS_FAILOVER_STATUS column displays SYNCHRONIZED and the FS_FAILOVER_OBSERVER_PRESENT column displays YES for the target standby database. For example:

In the following example, assume the network between the primary database and the observer has failed. In this case, the FS_FAILOVER_STATUS and FS_FAILOVER_

OBSERVER_PRESENT columns will appear as shown in the following table and fast-start failover will not occur:

5.5.6.3 What Happens if the Observer Fails?

If the primary and target standby databases stay connected but the connection to the observer is lost, then the broker reports that the configuration is not observed. The configuration and database status report that the observer is not running and return the following status messages:

Table 5–3 FS_FAILOVER_OBSERVER_PRESENT Column of the V$DATABASE View Column Value1

1 This value is consistent across instances in a Real Applications Cluster (RAC). That is, if the observer is connected to any instance in the RAC, all instances will show a value of YES.

Description

YES Observer is currently connected to the local database NO Observer is not connected to the local database

Database FS_FAILOVER_STATUS FS_FAILOVER_OBSERVER_PRESENT

Primary SYNCHRONIZED YES

Standby SYNCHRONIZED YES

Database FS_FAILOVER_STATUS FS_FAILOVER_OBSERVER_PRESENT

Primary SYNCHRONIZED NO

Standby PRIMARY UNOBSERVED YES

Fast-Start Failover

While the configuration is in the unobserved state, fast-start failover cannot happen.

Therefore, the primary database can continue processing transactions, even if the target standby database fails. The configuration status returns the SUCCESS status after the observer reestablishes its connection to the primary database, which then notifies the target standby database.

5.5.6.4 Stopping the Observer

You may want to stop the observer when you no longer want to use fast-start failover (see Section 5.5.4, "Disabling Fast-Start Failover") or if you want to move the observer to a different host machine (see Section 5.5.6.5, "Moving the Observer to Another Computer").

To stop the observer when fast-start failover is enabled, the primary database and target standby database must be connected and communicating with each other. Stopping the observer does not disable the fast-start failover. However, fast-start failover cannot occur when the primary database is in the unobserved state.

To stop the observer when fast-start failover is not enabled, only the primary database must be running.

You can stop the observer while connected to any database in the broker configuration, as follows:

Using Enterprise Manager

Choose the Stop Observer option on the first page of the fast-start failover wizard and click Continue at the bottom of the page. See the Enterprise Manager online help system for more information.

Using DGMGRL

Issue the following command:

DGMGRL> STOP OBSERVER;

See the STOP OBSERVER command on page 8-49 for more information.

5.5.6.5 Moving the Observer to Another Computer

To move the observer to another computer:

1. Stop the observer from any computer system in the broker configuration, as described in Section 5.5.6.4.

2. Start the observer on the new computer system, as described in Step 5 of Section 5.5.2.

There is no need to disable fast-start failover when you move the observer.

See Also: Section 5.5.3, "Viewing Fast-Start Failover Configuration Statistics and Status"

Note: The observer does not stop immediately when you issue STOP OBSERVER command. When the broker receives the STOP OBSERVER request, it informs the observer the next time the observer contacts the broker.

Fast-Start Failover

5.5.6.6 How the Observer Maintains Fast-Start Failover Configuration Information

The observer persistently maintains information about the fast-start failover

configuration in a binary file created in the working directory where you started the observer. By default, the observer creates this file when it is started and names the file fsfo.dat. This file contains connect descriptors to both the primary and the target standby databases. Ensure this file cannot be read by unauthorized users.

Once the file is created, you cannot change its name and location. However, you can change the name or the location of the file if you use the DGMGRL START OBSERVER command and include the FILE qualifier. See the START OBSERVER command on page 8-45 for more information.

Nel documento Oracle® Data Guard Broker 10g (pagine 101-104)