Sunday, January 22, 2017

How to Perform a Switchover to a Logical Standby Database.

1. Verify it is possible to perform a switchover on the primary database. A value of TO STANDBY or SESSIONS ACTIVE in the SWITCHOVER_STATUS column, if it is not; check the parameter of LOG_ARCHIVE_DEST_n is valid or not.

SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;

SWITCHOVER_STATUS
-------------------------
SESSIONS ACTIVE

2. Prepare the current primary database for the switchover.

SQL> ALTER DATABASE PREPARE TO SWITCHOVER TO LOGICAL STANDBY;

Database altered.

3. Check the status of current primary database.

SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;

SWITCHOVER_STATUS
--------------------
PREPARING SWITCHOVER

4. Prepare the target logical standby database for the switchover.

SQL> ALTER DATABASE PREPARE TO SWITCHOVER TO PRIMARY;

Database altered.

5. Check the status of current logical standby database.

SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;

SWITCHOVER_STATUS
--------------------
PREPARING SWITCHOVER

6. Check the status of current primary database.

SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;

SWITCHOVER_STATUS
--------------------
TO LOGICAL STANDBY

7.Switch the primary database to the logical standby database role.

SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO LOGICAL STANDBY;

Database altered.

8.Switch the logical standby database to the primary database role.

SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;

Database altered.

9 Start SQL Apply on the new logical standby database (Old primary database).

SQL> ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;

Database altered.

1 comment:

  1. Good information,thank you for sharing useful to every one
    http://erptree.com/course/oracle-fusion-hcm-online-training-in-san-francisco-bay-area-california-usa/

    ReplyDelete