All Products
Search
Document Center

Data Transmission Service:Synchronize or migrate events

Last Updated:Dec 12, 2024

When you include events in a data synchronization or migration instance, a schema is updated due to the events that the synchronization or migration object depends on. In this case, the data are synchronized or migrated to the destination database earlier than thay are to source database, and the data in the source and destination databases may become inconsistent. This topic describes how to use Data Transmission Service (DTS) to synchronize or migrate events to avoid data inconsistency.

Prerequisites

The data synchronization or migration instance must meet the following conditions:

  • The Database Type of the source database is MySQL or PolarDB for MySQL, and the Database Type of the destination database is MySQL or PolarDB for MySQL.

  • A schema synchronization or migration task and an incremental data synchronization or migration task are included in the DTS instance.

    • Migration instances: Select Schema Migration and Incremental Data Migration for the Migration Types parameter.

    • Synchronization instances: By default, Incremental Data Synchronization is selected for the Migration Types parameter. You must also select Schema Synchronization.

  • When you configure a data synchronization or migration task, you can set the Source Objects to an entire database.

Usage notes

  • An event is only synchronized or migrated once in a single synchronization or migration task.

  • If incremental data tasks (Incremental Data Migration) are not included in your data migration instance, and all other conditions for migrating events are met, DTS will automatically migrate the events from the source database to the destination database.

    Note

    For more information, see Task Details tab of the Schema Migration 2 module.

Procedure

Note

The operation methods for data synchronization and migration instances are similar. This procedure uses a data synchronization instance as an example.

Configure an instance

  1. Use one of the following methods to go to the Data Synchronization page and select the region in which the data synchronization instance resides.

    DTS console

    1. Log on to the DTS console.

    2. In the left-side navigation pane, click Data Synchronization.

    3. In the upper-left corner of the page, select the region in which the data synchronization instance resides.

    DMS console

    Note

    The actual operations may vary based on the mode and layout of the DMS console. For more information, see Simple mode and Customize the layout and style of the DMS console.

    1. Log on to the DMS console.

    2. In the top navigation bar, move the pointer over Data Development and choose DTS (DTS) > Data Synchronization.

    3. From the drop-down list to the right of Data Synchronization Tasks, select the region in which the data synchronization instance resides.

  2. Click Create Task to go to the task configuration page.

  3. Optional. Click New Configuration Page in the upper-right corner of the page.

    Note
    • Skip this step if the Back to Previous Version button is displayed in the upper-right corner of the page.

    • Specific parameters in the new and previous versions of the configuration page may be different. We recommend that you use the new version of the configuration page.

  4. Configure the source and destination database based on the actual situation.

    For more information, see Overview of data synchronization scenarios or Overview of data migration scenarios for related configuration documents.

  5. Click Test Connectivity and Proceed in the lower part of the page.

    Note
    • Make sure that the CIDR blocks of DTS servers can be automatically or manually added to the security settings of the source and destination databases to allow access from DTS servers. For more information, see Add the CIDR blocks of DTS servers.

    • If the source or destination database is a self-managed database and its Access Method is not set to Alibaba Cloud Instance, click Test Connectivity in the CIDR Blocks of DTS Servers dialog box.

  6. Select Whether to Migrate Events to Yes, and complete the subsequent operations.

    For more information, see Overview of data synchronization scenarios or Overview of data migration scenarios for related configuration documents.

Synchronize events

  1. Use one of the following methods to go to the Data Synchronization page and select the region in which the data synchronization instance resides.

    DTS console

    1. Log on to the DTS console.

    2. In the left-side navigation pane, click Data Synchronization.

    3. In the upper-left corner of the page, select the region in which the data synchronization instance resides.

    DMS console

    Note

    The actual operations may vary based on the mode and layout of the DMS console. For more information, see Simple mode and Customize the layout and style of the DMS console.

    1. Log on to the DMS console.

    2. In the top navigation bar, move the pointer over Data Development and choose DTS (DTS) > Data Synchronization.

    3. From the drop-down list to the right of Data Synchronization Tasks, select the region in which the data synchronization instance resides.

  2. Find the destination instance and click the ID of the destination instance.

  3. Optional: Click Task Management in the left-side navigation pane.

  4. In the Progress area, click Basic Information tab of the Incremental Write module.

  5. Click Migrate Event on the right side of the Actions.

    image

  6. Click OK in the pop-up Confirm dialog box.

  7. View the details of the event synchronization task.

    1. Uncheck Hide Completed Modules on the right side of the Progress.

    2. Click the Schema Migration 3 module.

    3. View the details in the Task Details tab.

      image