What are the sequences of steps used for switching from the primary database role to the standby database role?

Showing Answers 1 - 3 of 3 Answers

1. Verify that it is possible to perform a switchover operation. On the primary query the switchover_status column of v$database to verify that switchover to standby is possible. SQL> select switchover_status from v$database;

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

If SWITCHOVER_STATUS returns SESSIONS ACTIVE then you should either
disconnect all sessions manually or when performing step 2 you should append
the “with session shutdown” clause. For example:


SQL> alter database commit to switchover to standby with session shutdown;


2. Convert the primary database to the new standby:


SQL> alter database commit to switchover to physical standby;


Database altered.
Shutdown the former primary and mount as a standby database:


SQL> shutdown immediate
ORA-01507: database not mounted


ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.


Total System Global Area 85020944 bytes
Fixed Size 454928 bytes
Variable Size 71303168 bytes
Database Buffers 12582912 bytes
Redo Buffers 679936 bytes
SQL> alter database mount standby database;


Database altered.


5. Verify that the physical standby can be converted to the new primary:


SQL> select switchover_status from v$database;


SWITCHOVER_STATUS
------------------
SWITCHOVER PENDING


Note that if the status returns SESSIONS ACTIVE then you should append the

with session shutdown clause to the command in step 6.


6. Convert the physical standby to the new primary:


SQL> alter database commit to switchover to primary;


Database altered.


7. Shutdown and startup the new primary:


8. Start managed recover on the new standby database:


SQL> recover managed standby database disconnect;

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions