CHANGE_MIGRATION_MANAGER procedure

The CHANGE_MIGRATION_MANAGER procedure is used to manage actions performed by the Migration Manager within IBM® i Migrate While Active.

Actions control the migration environment throughout the migration process. The Migration Manager controls transitions between phases as actions are specified. Some actions execute immediately, while others transition through a pending phase before execution. Use the MIGRATION_MANAGER_INFO view to see information about the current phase and any pending phase for the Migration Manager.

Authorization: The privileges held by the authorization ID of the statement must include *ALLOBJ and *SECADM special authority, and
  • Start of changeWhen action is SWAP, the privileges held by the authorization ID must have *IOSYSCFG special authority.End of change

For the authority needed to use this procedure, see Db2® Mirror services authorization.

Read syntax diagramSkip visual syntax diagram CHANGE_MIGRATION_MANAGER ( ACTION =>  action )

The schema is QSYS2.

action

A string that indicates the migration action to be performed by the Migration Manager. The migration phase values described here are the values shown by the MIGRATION_MANAGER_INFO view in the MIGRATION_PHASE, MIGRATION_PHASE_DETAIL, and PENDING_MIGRATION_PHASE columns.

CANCEL PENDING

Cancels the action associated with the pending migration phase. The Migration Manager stops notifying jobs that a phase change has been requested, allowing them to continue their current migration activities uninterrupted.

This action has no effect when no pending migration phase is set.

FINAL

Initiates final migration activities for either the system migration stage or the data synchronization stage. Final processing completes the environment configuration within the system migration stage, or completes object synchronization before transitioning to the cutover stage.

The Migration Manager sets the pending migration phase to either FINAL SETUP or FINAL SYNCHRONIZATION and notifies jobs performing migration activities that final processing has been requested. The Migration Manager waits for these jobs to complete, then proceeds with the action. The migration phase and migration detail are updated to reflect the current activity.

Start of changeFINAL DIRECTEnd of change
Start of change

Initiates final migration activities to complete object synchronization before transitioning to the cutover stage. This action uses immediate synchronization of Db2 Mirror replication-eligible objects to complete the synchronization without any system outage.

The Migration Manager sets the pending migration phase to FINAL SYNCHRONIZATION and notifies jobs performing migration activities that final processing has been requested. The Migration Manager waits for these jobs to complete, then proceeds with the action. The migration phase and migration detail are updated throughout this process.

After the final migration activities complete, the Migration Manager automatically advances to the CUTOVER stage and sets the migration phase to SYNCHRONIZATION COMPLETE.

This action is only allowed when the current migration phase is IMMEDIATE SYNCHRONIZATION.

End of change
Start of changeIMMEDIATEEnd of change
Start of change

Start immediate synchronization of Db2 Mirror replication-eligible objects on the source node.

The Migration Manager sets the pending migration phase to IMMEDIATE SYNCHRONIZATION and notifies jobs performing migration activities that immediate synchronization has been requested for Db2 Mirror replication-eligible objects. The Migration Manager waits for the environment to allow immediate synchronization, then sets the migration phase to IMMEDIATE SYNCHRONIZATION and migration detail to ACTIVE.

End of change
PAUSE

Stops object synchronization to the target node. The Migration Manager sets the pending migration phase to PAUSED and notifies jobs performing object synchronization that a pause has been requested. After all jobs pause their migration activities, the Migration Manager sets the migration phase to PAUSED and migration detail to INACTIVE.

Object synchronization can only be paused when the current migration phase is Start of changeIMMEDIATE SYNCHRONIZATION or SYNCHRONIZINGEnd of change.

SETUP

Sets the initial environment for the system migration stage and starts configuration required for migration activities. When this action is performed, the migration phase is immediately set to SETUP and migration detail is set to ACTIVE. As configuration progresses during the system migration stage, the migration detail value is updated until setup is finished. At that time, the migration detail is set to COMPLETED.

When the migration phase is SETUP, only FINAL or TERMINATE actions are allowed.

SWAP

Performs a primary node role swap from the source node to the target node after final synchronization completes. This action is only allowed when the migration phase is either Start of changeIMMEDIATE SYNCHRONIZATIONEnd of change or Start of changeSYNCHRONIZATION COMPLETEEnd of change and migration detail is COMPLETED. During the primary node role swap, the target node becomes the primary node and allows object changes while the source node stops tracking modified objects.

A subsequent primary node role swap from the target node back to the source node is not allowed.

Start of changeA SWAP action is used in the following situations:
  1. To transition from SYNCHRONIZATION COMPLETE to SWAPPING in the cutover stage.
  2. To transition from IMMEDIATE SYNCHRONIZATION in the data synchronization stage to the cutover stage. The Migration Manager completes final synchronization without incurring an outage before entering the cutover stage, then automatically performs a primary node role swap.
End of change
SYNCHRONIZE

Initiates object synchronization between nodes. The Migration Manager sets the pending migration phase to SYNCHRONIZING and notifies jobs performing migration activities that continuous object synchronization has been requested. The Migration Manager waits for these jobs to complete and for the environment to allow object synchronization, then sets the migration phase to SYNCHRONIZING and migration detail to ACTIVE.

A SYNCHRONIZE action is used in the following situations:
  1. To transition from Start of changeSETUP COMPLETEEnd of change in the system migration stage to the data synchronization stage.
  2. To restart synchronization after a user-initiated pause (PAUSE action).
  3. To restart synchronization after a system-initiated interruption.
TERMINATE

Ends Migrate While Active on this node. Db2 Mirror configuration information is deleted, including tracking lists, temporary files, and logs associated with IBM i Migrate While Active. The node state changes to NOT CONFIGURED, and the migration phase and migration details are set to null.

A separate TERMINATE action must be performed on the other node to delete its configuration information.

Example

  • Enable initial configuration of IBM i Migrate While Active and set the current node as the source node.
    CALL QSYS2.CHANGE_MIGRATION_MANAGER(ACTION => 'SETUP');