You can use DTS to retrieve incremental data from ApsaraDB RDS for MySQL instances in real time. This feature applies to the following scenarios: cache updates, business decoupling, asynchronous data processing, real-time synchronization of heterogeneous data, and real-time data synchronization with complex ETL operations.

Supported instance types

Source database Data type

ApsaraDB RDS for MySQL

5.5, 5.6, and 5.7

Note This feature is no longer available after March 31, 2020. For more information, see [Notice] ApsaraDB RDS for MySQL users will no longer be able to use the previous change tracking feature after March 31, 2020. It is recommended that you use the new change tracking, For more information, see Change tracking (new)
  • Data update
  • Schema update

Objects for change tracking

The objects for change tracking include databases and tables.

Incremental data includes the following types:

  • Schema update that uses Data Definition Language (DDL)
  • Data update that uses Data Manipulation Language (DML)

When configuring a change tracking channel, you can select a data change type based on your business requirements.

Change tracking channel

A change tracking channel is the basic unit of incremental data tracking and consumption. To track data changes in a database instance, you must create a change tracking channel in the DTS console for the instance.

The change tracking channel pulls incremental data from the source database in real time and stores the incremental data that is generated in the last 24 hours. You can use the DTS SDK to subscribe to and consume incremental data from the change tracking channel. You can create, manage, and delete change tracking channels in the DTS console.

A change tracking channel can only be consumed by one downstream SDK client. To subscribe to a database instance by using multiple downstream SDK clients, you must create an equivalent number of change tracking channels. Database instances of these change tracking channels share the same instance ID.

The following table describes the statuses of a change tracking channel during creation and running.

Channel status Description Available operations
Prechecking The configuration of the change tracking channel is complete and a precheck is being performed. Delete the change tracking channel.
Not Started The change tracking channel has passed the precheck, but is not started.
  • Start the change tracking channel.
  • Delete the change tracking channel.
Performing Initial Change Tracking The initial change tracking is in progress. This process requires about one minute to complete. Delete the change tracking channel.
Normal Incremental data is being pulled from the data source.
  • View sample code.
  • View tracked data changes.
  • Delete the change tracking channel.
Error An error occurs when the change tracking channel is pulling incremental data from the data source.
  • View sample code.
  • Delete the change tracking channel.

A change tracking channel in the Error state will be resumed within seven days. To stop change tracking, you must release the change tracking channel.

Advanced features

You can use the following advanced features that are provided for change tracking:

  • Add and remove objects for change tracking

    You can add or remove the objects for change tracking.

  • View tracked data changes online

    You can view the incremental data in the change tracking channel online.

  • Modify consumption checkpoints

    You can modify consumption checkpoints.

  • Monitor the change tracking channel

    You can monitor the status of the change tracking channel and receive an alert if the threshold for downstream consumption is reached. You can set the alert threshold based on the sensitivity of your businesses to consumption latency.