A long time system outage might cause the crash of the primary system. The primary system
is disconnected. The failover process applies an active primary role in the secondary system.
Procedure
-
To determine the good recovery point on the secondary system, run the following on the primary
system:
apdr status --secondary
Example output:
========================Snapshot Recovery Point Details=========================
Availability Status: AVAILABLE
Recovery Point (UTC): 2018-09-05 18:20:05
The
good recovery point means that the availability status is
AVAILABLE
and there’s a
valid time stamp displayed.
-
Ensure the primary system is offline and its database is stopped.
-
Convert the role of the secondary system into an active primary role by logging in as
apuser
or equivalent and using:
-
To monitor the status of the failover process on the secondary system, run the following
command:
-
Start the secondary system by running:
- Once the original primary system has been recovered, initiate a role reversal on the
active primary system by running:
apdr changeRole
This will convert the secondary system's role into the primary system, and the old primary system
into the secondary system.
- Monitor the role reversal status by running:
apdr changeRole --status
Example status output of a successful role
reversal
Checking status of role reversal.
Role reverse status is: SUCCEEDED
Original Primary Fileset Status
local db2inst1 SUCCEEDED
scratch db2archive SUCCEEDED
data db2inst1 SUCCEEDED
head keystore SUCCEEDED
Original Secondary Fileset Status
local db2inst1 SUCCEEDED
scratch db2archive SUCCEEDED
data db2inst1 SUCCEEDED
head keystore SUCCEEDED
Results
After a successful failover and role reversal, the original secondary system has a primary
role and the database on it is started. The old primary system now has a standby secondary
role.