FAILOVER TO PLUGGABLE DATABASE

The FAILOVER TO PLUGGABLE DATABASE command invokes a failover that transitions the named target PDB into the role of a source PDB.

Syntax

FAILOVER TO PLUGGABLE DATABASE <pdb_name> AT <target_db_unique_name> [IMMEDIATE];

Command Parameters

pdb_name

Name of the target PDB to that you want to fail over to the source PDB role. This must be the same PDB that was used when setting up the source PDB with the ADD PLUGGABLE DATABASE command.

target_db_unique_name

The DB_UNIQUE_NAME initialization parameter value of the target container database containing the standby pluggable database to be failed over to.

Usage Notes

  • When there are problems with the source PDB, but the source database is available, perform a manual failover to a target PDB. The target PDB applies all the unapplied redo that it has received and then changes over to a source PDB role. This is referred to as a complete PDB failover.

  • When the source database is not accessible, perform immediate failover by using the FAILOVER PLUGGABLE DATABASE command with the IMMEDIATE option. No attempt is made to apply any unapplied redo that has been received. This option more likely results in lost application data.

  • The original source PDB must be manually re-enabled so that it can serve as a target PDB for the new source PDB.

Example 10-7 Performing Failover of a PDB

The following example performs a PDB failover in which the target PDB sales, contained in the target database newyork, transitions to the source PDB.

DGMGRL> FAILOVER TO PLUGGABLE DATABASE sales AT newyork;
 Verifying conditions for Failover...
   Source pluggable database is 'SALESB' at database 'boston'
 Performing FAILOVER now, please wait...
  Converting 'SALESB' to standby role...
  Waiting for 'SALES' to recover all redo data...
  Stopping recovery at 'SALES'...
  Converting 'SALES' to primary role...
  Opening new primary 'SALES'...
Failover succeeded, new primary is “sales”.