Resynchronization

Resynchronization processing encompasses the automatic actions taken by Db2® Mirror to establish or reestablish objects and data as being in sync across nodes.

Resynchronization can occur while replication is ACTIVE. For example, if an object is added to the RCL with the include option, the object is immediately resynchronized to the target node.

Resynchronization can also occur as a result of suspending and resuming replication. When Db2 Mirror replication is suspended, replication actions are tracked in the Object Tracking List (OTL). If row level changes are made to replicated database files, row level tracking occurs while the replication state is TRACKING. When replication is resumed, resynchronization uses the OTL as a to-do list of objects to resynchronize, including database files that require row level resynchronization.

For more details about the OTL and the resynchronization process, see Managing the Object Tracking List.

The Db2 Mirror administrator can review pending resynchronization work or understand the progress of resynchronization of objects and records within database files in several ways:
  1. Db2 Mirror GUI

    The Db2 Mirror GUI provides graphical interfaces over the OTL. The Db2 Mirror GUI includes features for anyone who needs to configure, administer, or monitor Db2 Mirror.

    Some of the most important resynchronization scenarios are shown in the following section.

  2. QSYS2.MIRROR_INFO view

    The QSYS2.MIRROR_INFO view includes resynchronization status information for SYSBAS and all varied on database IASPs. If the REPLICATION_STATE is TRACKING, actions against replicated objects are added to the OTL. When the REPLICATION_STATE returns to ACTIVE, the REPLICATION_DETAIL is set to SYNCHRONIZING, indicating that the OTL entries are being processed. When the REPLICATION_DETAIL changes to REPLICATING, Db2 Mirror resynchronization processing has completed.

    The figure below shows that *SYSBAS and the IASP33P database IASP are under active replication, while the ITST3 database IASP is tracking replication actions and is in phase one of resynchronization.
    Figure 1. QSYS2. MIRROR_INFO view
    QSYS2.MIRROR_INFO view

    Refer to MIRROR_INFO view for the complete description of the view.

  3. QSYS2.RESYNC_STATUS view

    The QSYS2.RESYNC_STATUS view can be queried to review activity and status from current and historical resynchronizations. Refer to RESYNC_STATUS view for details.

Resynchronization, the OTL, and the Db2 Mirror GUI

The Db2 Mirror GUI includes extensive support for you to observe, study, influence, and respond to resynchronization topics. On the Db2 Mirror main page, the replication state is clearly displayed.

As shown in the following figures, active replication and resynchronization look different in the GUI.

Figure 2. Active replication
Active replication

If replication is suspended for any reason, at some point you will resume replication, either implicitly or explicitly. When replication resumes, resynchronization processing will occur.

When resynchronization is occurring, the Db2 Mirror GUI main page changes in three ways:
  1. The bi-direction arrows between the nodes change to a Primary to Secondary arrow.
  2. The ribbon connecting the Primary and Secondary nodes changes from green to yellow.
  3. The replication state and replication detail that appear below each node change from Active and Replicating to Tracking and Synchronizing (on the primary) or Blocked and Synchronizing (on the secondary).
Figure 3. Synchronizing nodes
Synchronizing nodes

If Db2 Mirror is showing on-going resynchronization, you can either periodically refresh this dialog until active replication is reestablished or you can drill into the OTL-based dialogs in the Db2 Mirror GUI.

The simplest action is to right-click on the primary node and choose View Tracking List Details.

Figure 4. View tracking list details
View tracking list details

Within the Current Tracking Entries dialog, you can monitor the progress of resynchronization by periodically clicking the refresh button. When resynchronization completes for an object, it will be removed from the list.

Figure 5. Current Tracking Entries
Current tracking entries

From the home screen you can also access the OTL by clicking on the OTL navigation icon and selecting one of the OTL menu items.

Figure 6. OTL options in the GUI
OTL options in the GUI

Db2 Mirror dialogs are customizable and interactive. You can add, subtract, and reorder columns. Rows can be reordered by clicking on a column header. Rows can be reduced using filtering criteria.

The current tracking rows contain a lot of detail related to what is being resynchronized, along with detail indicating why the row was added. Each row has a resynchronization start and end timestamp, along with many other pieces of information.

The data shown by the Db2 Mirror GUI can also be accessed by querying the QSYS2.RESYNC_STATUS view.

Database I/O Resynchronization Progress

If Db2 Mirror resynchronization encounters one or more database files with many changed rows, the resynchronization may take long enough that the administrator needs insight into the progress of row level resynchronization for specific files.

For details about row level resynchronization, you can shift from using the Db2 Mirror GUI or SQL Services to using IBM® i Access Client Solutions (ACS).

Figure 7. ACS schemas
ACS schemas

Within the ACS Database Schemas support, there is a Database Maintenance folder. Db2 Mirror Resynchronizations is a topic in this folder.

Figure 8. ACS Database Maintenance - Db2 Mirror Resynchronizations
ACS Database Maintenance - Db2 Mirror Resynchronizations
The Database Maintenance folder can help you in two ways:
  1. For some potentially long running database operations, the Database Maintenance folder provides a historical perspective for how long the operation took to complete. If you are planning for upcoming maintenance, you can refer to the historical detail for insight into how long a specific operation normally takes to complete.
  2. For active database operations, the Database Maintenance folder includes a progress indicator. The progress indicator is valuable for a Db2 Mirror I/O resynchronization operation because it is automatically updated with percentage completion and elapsed time detail. By observing this progress detail, you can estimate when replication will complete for a database file that is resynchronizing many rows.
Figure 9. Database I/O resynchronization in progress
Database I/O resynchronization in progress