Data Transmission Service (DTS) lets you capture data changes from a source database and stream them to downstream consumers. This guide walks you through configuring a change tracking task for an ApsaraDB RDS for MySQL instance.
In this guide, you learn how to:
-
Configure source database connection and consumer network settings
-
Select the databases or tables to track
-
Run a precheck and purchase the tracking instance
The parameters shown in the DTS console vary by source database type and access method. For a full list of supported source databases, see Overview of change tracking scenarios.
Prerequisites
Before you begin, make sure you have:
-
A supported source database — The database type and version must be supported by DTS. See Overview of change tracking scenarios.
-
A database account with the required permissions — The account must be a read-only account, or a custom account that has the REPLICATION CLIENT, REPLICATION SLAVE, SHOW VIEW, and SELECT permissions.
-
(Self-managed databases only) A prepared environment — If the source is a self-managed database, complete the required setup first. See Preparation overview.
Configure the change tracking task
Step 1: Open the task configuration page
-
Log on to the Data Management (DMS) console.
-
In the top navigation bar, click DTS. In the left-side navigation pane, choose DTS (DTS) > Change Tracking.
Alternatively, open the new DTS console directly. If you use Simple Mode in the DMS console, click the Enter Simple Mode icon in the upper-right corner, move the pointer over the icon in the upper-left corner, and then choose All functions > DTS > Change Tracking. For more information, see Customize the layout and style of the DMS console.
-
To the right of Change Tracking Tasks, select the region where you want to create the task.
In the new DTS console, select the region from the drop-down list to the right of Workbench.
-
Click Create Task.
-
If New Configuration Page appears in the upper-right corner, click it to switch to the new configuration page. If Back to Previous Version is displayed instead, you are already on the new page.
Step 2: Configure the source database and consumer network
After you select the source database instance, read the Limits at the top of the page. Skipping this step may cause the task to fail or prevent tracked data from being consumed.
Configure the following parameters:
| Section | Parameter | Description |
|---|---|---|
| N/A | Task Name | A name for the task. DTS assigns one automatically — change it to something descriptive if you manage multiple tasks. Task names do not need to be unique. |
| Source Database | Select a DMS database instance. | Select an existing DMS instance, or leave blank and configure the connection manually. |
| Database Type | Select MySQL. | |
| Access Method | Select Alibaba Cloud Instance. | |
| Instance Region | The region where the ApsaraDB RDS for MySQL instance resides. | |
| Replicate Data Across Alibaba Cloud Accounts |
Select No if the source instance is in the current Alibaba Cloud account. |
|
| RDS Instance ID | The ID of the ApsaraDB RDS for MySQL instance. | |
| Database Account | The database account. Must be a read-only account, or a custom account that has the REPLICATION CLIENT, REPLICATION SLAVE, SHOW VIEW, and SELECT permissions. | |
| Database Password | The password for the database account. | |
| Encryption | Use the default setting. | |
| Consumer Network Type | Network Type | Fixed to VPC. Select a VPC and a vSwitch. See VPCs for background. If your change tracking client is deployed in a VPC, select the same VPC and vSwitch to minimize network latency. |
After you save the task, the Consumer Network Type settings cannot be changed.
Step 3: Test connectivity
Click Test Connectivity and Proceed at the bottom of the page.
DTS automatically adds its server CIDR blocks to the whitelist or security group rules of the source instance, depending on the instance type:
| Source database type | CIDR block action |
|---|---|
| Alibaba Cloud database instance (for example, ApsaraDB RDS) | Added to the instance whitelist automatically |
| Self-managed database on an ECS instance | Added to the ECS security group rules automatically |
| Self-managed database in a data center or third-party cloud | Must be added manually |
For manual configuration, see Add the CIDR blocks of DTS servers.
Adding the public CIDR blocks of DTS servers to a database whitelist or ECS security group introduces security risks. Before proceeding, take preventive measures such as strengthening username and password security, restricting exposed ports, authenticating API calls, regularly auditing whitelist rules and removing unauthorized CIDR blocks, or connecting to DTS through Express Connect, VPN Gateway, or Smart Access Gateway.
Step 4: Select objects for change tracking
On the Configure Objects page, configure the following:
Data change types
The Data Change Types parameter is pre-configured and cannot be modified. It includes:
-
Data Update: tracks INSERT, DELETE, and UPDATE operations on the selected objects.
-
Schema Update: tracks DDL operations (create, delete, and modify) on all object schemas of the source instance. Use the change tracking client to filter which schema changes to consume.
Source objects
Select one or more objects from Source Objects and click the right-arrow icon to add them to Selected Objects.
Choose the granularity that matches your use case:
-
Database: DTS tracks all objects in the database, including tables added after the task starts.
-
Table: DTS tracks only the selected table. To track additional tables later, add them separately. See Modify the objects for change tracking.
Step 5: Configure advanced settings
Click Next: Advanced Settings and configure as needed:
| Parameter | Description |
|---|---|
| Dedicated Cluster for Task Scheduling | By default, DTS schedules the task to a shared cluster. To run the task on a dedicated cluster, purchase one first. See What is a DTS dedicated cluster. |
| Retry Time for Failed Connections | How long DTS retries when the connection to the source database fails. Valid values: 10–1,440 minutes. Default: 720 minutes. We recommend that you set this to a value greater than 30 minutes. If DTS reconnects within this window, the task resumes; otherwise, it fails. Note
When multiple tasks share the same source instance, the shortest retry window applies to all of them. Fees are charged during retry periods. |
| Retry Time for Other Issues | How long DTS retries when DDL or DML operations fail after the task starts. Valid values: 1–1,440 minutes. Default: 10 minutes. We recommend that you set this to a value greater than 10 minutes. This value must be less than the Retry Time for Failed Connections value. |
| Environment Tag | An optional tag to identify the DTS instance by environment (for example, production or staging). |
| Whether to delete SQL operations on heartbeat tables of forward and reverse tasks | Controls whether DTS writes SQL operations on heartbeat tables to the source database while the task runs. Select Yes to prevent writes (a task latency warning may appear). Select No to allow writes (physical backup and cloning of the source database may be affected). |
| Monitoring and Alerting | Select Yes to receive alert notifications when the task fails or latency exceeds the threshold. Configure the alert threshold and notification settings. See Configure monitoring and alerting when you create a DTS task. |
Step 6: Run the precheck
Click Next: Save Task Settings and Precheck at the bottom of the page.
To preview the API parameters for this task configuration, hover over Next: Save Task Settings and Precheck and click Preview OpenAPI parameters before proceeding.
DTS runs a precheck before starting the task. Wait for Success Rate to reach 100% before continuing.
If the precheck fails or generates alerts:
-
Failed item: Click View Details next to the item, fix the issue based on the error message, then click Precheck Again.
-
Alert item that cannot be ignored: Click View Details, fix the issue, then rerun the precheck.
-
Alert item that can be ignored: Click Confirm Alert Details. In the dialog box, click Ignore, then click OK. Click Precheck Again to continue.
WarningIgnoring an alert may cause data inconsistency or expose your business to risk. Only ignore alerts when you fully understand the impact.
Step 7: Purchase the change tracking instance
Once Success Rate reaches 100%, click Next: Purchase Instance.
On the Purchase page, configure the billing settings:
| Parameter | Description |
|---|---|
| Billing method | Subscription: pay upfront for a fixed term. More cost-effective for long-term use — longer terms get lower prices. Pay-as-you-go: billed hourly. Suitable for short-term or experimental use. Release the instance when no longer needed to stop charges. |
| Resource Group Settings | The resource group for the instance. Defaults to default resource group. See What is Resource Management? |
| Billing Type of Change Tracking Instance | Subscription billing only supports Full-price Configuration Fee (No Data Traffic Fee). |
| Subscription Duration | Available when Subscription is selected. Set the subscription duration and the number of instances that you want to create. Options: 1–9 months, 1 year, 2 years, 3 years, or 5 years. |
Read and accept the Data Transmission Service (Pay-as-you-go) Service Terms, then click Buy and Start. The task appears in the task list and starts running.