Oracle Database 12c : New Features for Administrators Book.
Oracle Database 12c: New Features for Administrators vol :- 1
Oracle Database 12c: New Features for Administrators vol :-2
SWITCHOVER_STATUS column of the V$DATABASE view on the primary database.For example:
SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
SWITCHOVER_STATUS
-----------------
TO STANDBY
1 row selected
A value of TO STANDBY or SESSIONS ACTIVE
indicates that the primary database can be switched to the standby role.
If neither of these values is returned, a switchover is not possible
because redo transport is either misconfigured or is not functioning
properly.SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH
SESSION SHUTDOWN;
This statement converts the primary database into a physical standby
database. The current control file is backed up to the current SQL
session trace file before the switchover. This makes it possible to
reconstruct a current control file, if necessary.WITH SESSION SHUTDOWN clause can be omitted from the switchover statement if the query performed in the previous step returned a value of TO STANDBY.SQL> SHUTDOWN ABORT;
SQL> STARTUP MOUNT;
At this point in the switchover process, the original primary database is a physical standby databaseSWITCHOVER_STATUS column of the V$DATABASE view on the standby database.
For example:SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
SWITCHOVER_STATUS
-----------------
TO_PRIMARY
1 row selected
A value of TO PRIMARY or SESSIONS ACTIVE
indicates that the standby database is ready to be switched to the
primary role. If neither of these values is returned, verify that Redo
Apply is active and that redo transport is configured and working
properly. Continue to query this column until the value returned is
either TO PRIMARY or SESSIONS ACTIVE.SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY
WITH SESSION SHUTDOWN;
WITH SESSION SHUTDOWN clause can be omitted from the switchover statement if the query performed in the previous step returned a value of TO PRIMARY.SQL> ALTER DATABASE OPEN;
SQL> ALTER DATABASE RECOVER MANAGED STANDBY
DATABASE DISCONNECT FROM SESSION;
Now enjoy with New Primary database....