Step 4: Compare Migration Items

This section describes how to compare migration items to check if there are any differences between source and destination databases. By comparing migration objects, you can determine the proper time for service migration to minimize the service downtime.

Figure 1 Comparison process

Comparison Scenarios

You can compare migration objects with different dimensions:

When you check data consistency, compare the number of rows first. If the number of rows are inconsistent, you can then compare the data in the table to determine the inconsistent data.

Comparison Restrictions

Impact on Databases

Estimated Comparison Duration

Prerequisites

Creating a comparison task

You can follow the comparison process or select a comparison method based on your service scenario. The following operations describe how to compare migration items by following the recommended migration process.

  1. On the Online Migration Management page, click the target migration task name in the Task Name/ID column.
  2. On the Migration Comparison tab, compare objects of the source and destination databases.

    1. Check the integrity of the database object.

      Click Validate Objects. On the Object-Level Comparison tab, view the comparison result of each comparison item.

      Locate a comparison item you want to view and click View Details in the Operation column.

    2. After the check is complete, compare the number of rows and values.
      1. In the Before You Start pane, click Validate All Rows/Values.
      2. In the displayed Create Comparison Task dialog box, specify Comparison Type, Comparison Time, and Object. Then, click OK.
        • Comparison Type: compares rows and values.
        • Comparison Time: You can select Start upon task creation or Start at a specified time. There is a slight difference in time between the source and destination databases during synchronization. Data inconsistency may occur. You are advised to compare migration items during off-peak hours for more accurate results.
        • Object: You can select objects to be compared based on the scenarios.

        After the comparison creation task is submitted, the Data-Level Comparison tab is displayed. Click to refresh the list and view the comparison result of the specified comparison type.

        To view the comparison details, locate the target comparison type and click View Results in the Operation column. On the displayed page, locate a pair of source and destination databases, and click View Details in the Operation column to view detailed comparison results.

        You can cancel a running task at any time and view the comparison report of a canceled comparison task.

    3. Perform a double check before the cutover.

      Click Double Check During Cutover. In the displayed Create Comparison Task dialog box, specify Comparison Type, Comparison Time, and Object. Then, click OK.

      For details about how to view comparison details, see 2.b.

    4. Stop the migration task.

      After the service system is successfully migrated to the destination database, stop the migration task to prevent operations in the source database from being synchronized to the destination database to overwrite the data. This operation only deletes the replication instance, and the migration task is still in the task list. You can view or delete the task.

      Generally, stopping a task can ensure the integrity of special objects because triggers and events are migrated when a task is being stopped. Only in some cases, such as network disconnections, a task may fail to be stopped. If a task fails to be stopped multiple times, you can select Forcibly stop task to reduce the waiting time. If you forcibly stop a task, triggers and events may not be completely migrated and you need to manually migrate them.

Quick Comparison

To accelerate and simplify the migration process, DRS provides the quick comparison function. You can directly perform a comparison on the migration task list. This function can be used to compare all migration objects only when incremental migration tasks are in progress.

  1. On the Online Migration Management page, locate the target migration task and click Compare in the Operation column.
  2. On the Create Comparison Task page, select Start upon task creation or Start at a specified time and click Yes to start the comparison task.

Viewing a Comparison Task

  1. On the Online Migration Management page, locate the target migration task and click View in the Operation column.
  2. On the Migration Comparison tab, view the data comparison result.