Time for action – switchover with a logical standby database using SQL*Plus
Now we will see a step-by-step approach to perform a switchover between the primary and the logical standby database:
Check the switchover status of the primary database. Ensure that the status is either
TO STANDBY
orSESSIONS ACTIVE
; if so, you are safe to perform a switchover as shown in the following code:SQL> select switchover_status from v$database; SWITCHOVER_STATUS -------------------- TO STANDBY
Note
In case of
RESOLVABLE GAP
, wait until SQL was applied on the logical standby database; for other statuses, troubleshoot and fix the synchronization for the switchover process to be successful.Prepare the primary database for switchover. Execute the following command from the primary database so that the current primary database will be accepted to perform a switchover to a logical standby database:
SQL> alter database prepare to switchover to logical standby; Database altered.
On the primary alert log, issue...