Reenabling Disabled Databases After Failover or Switchover

Nel documento Oracle® Data Guard Broker 10g (pagine 84-87)

Switchover and Failover Operations

Step 4 Re-establish a disaster-recovery configuration

5.4.3 Reenabling Disabled Databases After Failover or Switchover

To restore your original disaster-recovery solution after switchover to a logical standby database or after failover to any standby database, you may need to perform

additional steps.

Note: Standby databases not directly involved in a failover may be disabled by the broker during the failover, and they must be reenabled in the configuration before they can serve as standby databases to the new primary database. If there is more than one standby database in the configuration, Oracle recommends configuring Flashback Database on every database so that if failover occurs to a physical standby database, you can more easily reinstate any disabled physical standby databases. However, if failover occurs to a logical standby database, all (physical and logical) standby databases will be disabled by the broker. In this case, Flashback Database cannot be used to reinstate databases.

To use Flashback Database, you must configure it on every

database in the configuration. Then, after a failover occurs, you can use Flashback Database to reinstate your disabled physical standby database.

Manual Failover

Databases that have been disabled after a role transition are not removed from the broker configuration, but they are disabled in the sense that the databases are no longer managed by the broker.

To reenable broker management of these databases, you must reinstate or re-create the databases using one of the following procedures:

If a database can be reinstated, the database will show the following status after a complete failover:

ORA-16661: the standby database needs to be reinstated

Reinstate the database using the DGMGRL REINSTATE DATABASE command or the reinstate option in Enterprise Manager, as described in Section 5.4.3.1, "How to Reinstate a Database" on page 5-12.

If a database must be re-created from a copy of the new primary database, it will have the following status:

ORA-16795: the broker detects that database re-creation is required Re-create the standby database from a copy of the primary database and then reenable it. The procedures for creating a standby database are documented in Oracle Data Guard Concepts and Administration. See Section 5.4.3.2, "How to Re-create and Reenable a Disabled Database" on page 5-13 for more information.

Whether you reinstate or re-create a database depends on if you performed a switchover or failover and on the type of standby database that was the target of the operation.

The following table describes how to reenable disabled databases based on the type of role transition that was performed. The status value associated with databases that are disabled after a switchover or failover will also guide you in choosing which

procedure to use. These status values can be viewed in the output from the DGMGRL SHOW DATABASE or on the Data Guard Overview page in Enterprise Manager.

Note: After switchover to a physical standby database, no

additional action is required. The standby databases not involved in the switchover continue to operate in the state they were in before the switchover occurred and will automatically begin applying redo data received from the new primary database.

Note: Any database that was disabled through multiple role changes cannot be reinstated. You must re-create the database manually and then reenable the database in the broker configuration.

Table 5–1 Reenabling Disabled Databases After Failover or Switchover

Role Transition

(Switchover or Failover)

Reinstate or Re-create a Failed Primary Database

Reenabling the Standby Databases Not Involved in the Role Transition Switchover to a physical

standby database

No action is required. No action is required.

Manual Failover

The following sections describe how to reinstate or reenable a database.

5.4.3.1 How to Reinstate a Database

You can use the broker’s REINSTATE command to reenable the failed primary database after performing a complete failover to either a physical or logical standby database. You can also use the broker's REINSTATE command to reenable any physical standby databases that were not the target of the failover operation but were disabled during a complete failover to a physical standby database.

Switchover to a logical standby database

No action is required. All physical standby

databases will be disabled and must be re-created from a copy of the new primary database. Logical standby databases will not be disabled.

Complete failover to a physical standby database

The broker disables the failed primary database during the failover operation. You can reinstate the database if Flashback Database was enabled prior to the failover and there are sufficient flashback logs on the failed primary database.

Otherwise, you must re-create the primary database from a copy of the new primary database.

Physical standby databases that were disabled during failover can be reinstated if Flashback Database was enabled prior to failover and there are sufficient flashback logs on the physical standby database. Otherwise, the physical standby databases must be re-created from a copy of the new primary database.

Logical standby databases disabled during failover must be re-created from a copy of the new primary database.

Complete failover to a logical standby database

The broker disables the failed primary database during the failover. You can reinstate the database if Flashback Database was enabled prior to failover and there are sufficient flashback logs on the failed primary database.

Otherwise, re-create the primary database from a copy of the new primary database.

The broker disables all standby databases not involved in the failover. You must re-create the databases from a copy of the new primary database.

Immediate failover to either a physical or logical standby database

The broker disables the failed primary database during failover. You must re-create the database from a copy of the new primary database.

The broker disables all standby databases not involved in the failover. You must re-create the databases from a copy of the new primary database.

Table 5–1 (Cont.) Reenabling Disabled Databases After Failover or Switchover

Role Transition

(Switchover or Failover)

Reinstate or Re-create a Failed Primary Database

Reenabling the Standby Databases Not Involved in the Role Transition

Fast-Start Failover

Databases that can be reinstated will have the following status value:

ORA-16661: the standby database needs to be reinstated

For the REINSTATE command to succeed, Flashback Database must have been enabled on the database prior to the failover and there must be sufficient flashback logs on that database. In addition, the database to be reinstated and the new primary database must have network connectivity.

To reinstate a database:

1. Restart the database to the mounted state 2. Connect to the new primary database

3. Use Enterprise Manager or DGMGRL to reinstate the database

When reinstating a failed primary database, the broker reenables it as a standby database of the same type (physical or logical standby database) as the old standby database. When reinstating physical standby databases that were disabled during a failover, the broker reenables them as physical standby databases to the new primary database.

Reinstatement Using Enterprise Manager

On the Data Guard Overview page, click the Database must be reinstated link.

This brings up the General Properties page that provides a Reinstate button. After you click the Reinstate button, Enterprise Manager begins reinstating the database.

When the process is complete, the database will be enabled as a standby database to the new primary database, and Enterprise Manager displays the Data Guard Overview page.

Reinstatement Using DGMGRL

Issue the following command while connected to any database in the broker configuration, except the database that is to be reinstated:

DGMGRL> REINSTATE DATABASE db_unique_name;

The newly reinstated standby database will begin serving as standby database to the new primary database. If the database is not reinstated successfully, then you must reenable it from a copy of the new primary database, as described in Section 5.4.3.2.

5.4.3.2 How to Re-create and Reenable a Disabled Database

If you performed a failover or switchover that requires you to re-create the failed primary database or standby databases that were disabled during the role transition, follow the procedures in Oracle Data Guard Concepts and Administration.

After the database has been re-created, enable broker management of the re-created standby database by using the DGMGRL ENABLE DATABASE command.

Nel documento Oracle® Data Guard Broker 10g (pagine 84-87)