Steps To Failover in 12c using SQL*Plus
Solution
For Planned Failover :
NOTE :
Make sure both Primary and Standby is working fine .
Verify that the standby database has the most recently archived redo log file for each primary database redo thread.
Ensure that Redo Apply is active at the target standby database.
Query the V$ARCHIVE_GAP view on the target standby database to determine if there are any redo gaps on the target standby database.
For example:
SQL> SELECT THREAD#, LOW_SEQUENCE#, HIGH_SEQUENCE# FROM V$ARCHIVE_GAP;
: Stop Redo Apply.
Issue the following SQL statement on the target standby database:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
Switch the physical standby database to the primary role.
Issue the following SQL statement on the target standby database:
SQL> ALTER DATABASE FAILOVER TO target_db_name;
++If this statement completes without any errors.
: Open the new primary database.
SQL> ALTER DATABASE OPEN;
: Back up the new primary database.
Oracle recommends that you perform a full backup of the new primary database.
Reference : http://docs.oracle.com/database/121/SBYDB/role_management.htm#SBYDB5171
Dataguard Failover 12c using SQL*Plus (Doc ID 2144024.1)