The transition figure of the switch of primary database and logical standby database is as follows.
Initial status.
Confirm if there is redo gap on a logical standby database.
Confirm whether the sequence number is corresponding to the primary site and the standby site before and after the log switch. If the sequence number do not correspond, resolve a redo gap.
See
For further details, refer to the Oracle Database manual.
Start maintenance mode of PRIMECLUSTER.
To prevent the failover that userApplication does not intend, start the maintenance mode of PRIMECLUSTER on the operation node of both sites.
# /opt/SMAW/SMAWRrms/bin/hvutil -M on
Confirm that the state of userApplication becomes “Maintenance".
Monitoring disruption of Oracle resource.
To kill the session to Oracle, stop monitoring the Oracle instance and Listener resources on the both nodes of both sites.
# /opt/FJSVclora/sbin/hvoradisable -a <userApplication>
Confirm that stop of monitoring have been successfully done.
(Refer to note of "4.1 hvoradisable - Discontinue Monitoring Resources".)
Switch roll of Oracle Data Guard (Switchover)
The procedure that switch roll of Oracle Data Guard is as follows.
See
For further details, refer to the Oracle Database manual.
Verify it is possible to perform a switchover.
Issue the following SQL statement on a primary database.
SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
A value of TO STANDBY or SESSIONS ACTIVE in the SWITCHOVER_STATUS column indicates that it is possible to switch the primary database to the logical standby role. Go to the next step.
If one of these values is not displayed, resolve the error. After issue the above SQL statement again and confirm SWITCHOVER_STATUS column.
Prepare the current primary database for the switchover.
Issue the following SQL statement on a primary database to initiate the switchover.
SQL> ALTER DATABASE PREPARE TO SWITCHOVER TO LOGICAL STANDBY;
The value PREPARING SWITCHOVER is displayed in the SWITCHOVER_STATUS column in V$DATABASE view if this operation succeeds.
Prepare the target logical standby database for the switchover.
Issue the following SQL statement on a logical standby database.
SQL> ALTER DATABASE PREPARE TO SWITCHOVER TO PRIMARY;
The value PREPARING SWITCHOVER is displayed in the SWITCHOVER_STATUS column in V$DATABASE view if this operation succeeds.
Confirm whether the database has received a data dictionary.
Issue the following SQL statement on a primary database.
SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
A value of TO LOGICAL STANDBY in the SWITCHOVER_STATUS column indicates that the database has received a data dictionary from a logical standby database. Go to the next step.
Switch the primary database to the logical standby database role.
Issue the following SQL statement on a primary database.
SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO LOGICAL STANDBY;
Confirm whether the logical standby database is ready to switch to the primary database.
Issue the following SQL statement on a new logical standby database.
SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
A value of TO PRIMARY in the SWITCHOVER_STATUS column indicates that the logical standby database is ready to switch to the primary database. Go to the next step.
Switch the target logical standby database to the primary database role.
Issue the following SQL statement on a new logical standby database.
SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
Start SQL Apply on the new logical standby database.
Issue the following SQL statement according to the REDOApply of the Oracle instance resource on the new logical standby database.
ReceiveOnly, ReadOnlyOPEN, RealTimeQueryN or RealTimeQueryR
No procedure.
NormalApply
ALTER DATABASE START LOGICAL STANDBY APPLY;
RealTimeApply
ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;
Restart Oracle resource monitoring.
Start monitoring the Oracle instance and Listener resources on the both nodes of both sites.
# /opt/FJSVclora/sbin/hvoraenable -a <userApplication>
Confirm that restart of monitoring have been successfully done.
(Refer to note of "4.2 hvoraenable - Restart Monitoring Resources".)
Stop maintenance mode of PRIMECLUSTER.
Stop the maintenance mode of PRIMECLUSTER on the operation node of both sites.
# /opt/SMAW/SMAWRrms/bin/hvutil -M off
Confirme the state of userApplication becomes "Online" or "Offline".