Manual Failover to a Physical Standby Database
Use the following commands to perform a manual failover of a physical standby database:
1. For manual failovers in a Real Application Clusters environment, issue the SHUTDOWN ABORT statement on all RAC instances on secondary standby databases prior to performing the failover.
2. Initiate the failover by issuing the following on the target standby database:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH FORCE;
Note: Include the FORCE keyword to ensure that the RFS processes on the standby database will fail over without waiting for the network connections to time out through normal TCP timeout processing before shutting down.
3. Convert the physical standby database to the primary role:
SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
4. If the standby database was never opened read-only since the last time it was started, then open the new primary database by issuing the following statement:
SQL> ALTER DATABASE OPEN;
If the physical standby database has been opened in read-only mode since the last time it was started, shut down the target standby database and restart it:
SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP;
Note: To avoid waiting for the redo in the standby redo log file to be applied prior to performing the failover, issue the ALTER DATABASE ACTIVATE STANDBY DATABASE statement to perform a failover. This statement converts the standby database to a primary database, creates a new resetlogs branch, and opens the database. However, because this statement may cause data loss, Oracle recommends you use only the failover steps and commands described in the above steps to perform a failover.