You can use Data Transmission Service (DTS) to track data changes from ApsaraDB RDS for MySQL instances in real time. This feature applies to the following scenarios: cache updates, business decoupling, synchronization of heterogeneous data, and synchronization of extract, transform, and load (ETL) operations.
Supported instance types
|Source database||Data change type|
ApsaraDB RDS for MySQL
Versions 5.5, 5.6, and 5.7
Note The previous change tracking feature is no longer available. We recommend that you use the new change tracking feature. For more information, see Change tracking (new).
Objects for change tracking
The objects for change tracking include databases and tables.
Data changes include the following types:
- Data update that uses data manipulation language (DML)
- Schema update that uses data definition language (DDL)
When you configure a change tracking task, you can select a data change type based on your business requirements.
Change tracking tasks
A change tracking task is the basic unit of change tracking and data consumption. To track data changes from a database instance, you must create a change tracking task in the DTS console for the instance.
The change tracking task pulls data changes from the database instance in real time and stores the data changes that were generated in the last 24 hours. You can use the DTS SDK to consume the tracked data. You can also create, manage, or delete change tracking tasks in the DTS console.
A change tracking task can be consumed by only one downstream SDK client. To track data changes from a database instance by using multiple downstream SDK clients, you must create an equivalent number of change tracking tasks. Database instances of these change tracking tasks share the same instance ID.
The following table describes the statuses of a change tracking task when you create and run the task.
|Task status||Description||Available operation|
|Prechecking||The configuration of the change tracking task is complete and a precheck is being performed.||Delete the change tracking task|
|Not Started||The change tracking task has passed the precheck but has not been started.||
|Performing Initial Change Tracking||The initial change tracking is in progress. This process takes about 1 minute.||Delete the change tracking task|
|Normal||Data changes are being pulled from the data source.||
|Error||An error occurs when the change tracking task pulls data changes from the data source.||
A change tracking task in the Error state will be resumed within seven days. To stop change tracking, you must pause or stop the change tracking task.
You can use the following advanced features that are provided for change tracking:
- Add or remove the objects for change tracking
You can add or remove the required objects when a change tracking task is running.
- View the tracked data
In the DTS console, you can view the data that is tracked by a change tracking task.
- Modify consumption checkpoints
You can modify the consumption checkpoints.
- Monitor change tracking tasks
You can monitor the status of change tracking tasks. If the threshold for consumption delay is reached, you will receive an alert. You can set the alert threshold based on the sensitivity of your business to consumption delay.