Data Transmission Service (DTS) provides an easy-to-use change tracking feature. You can configure a change tracking task in a few simple steps in the DTS console.
Usage notes
This topic describes the general procedure for configuring a change tracking task. For detailed examples for different data sources, see Overview of change tracking scenarios.
This topic uses an ApsaraDB RDS for MySQL instance as an example. The parameter settings are for reference only. The actual UI may vary.
Prerequisites
-
You have created a source database instance that is supported by DTS. For more information about supported databases and versions, see Overview of change tracking scenarios.
-
When the source database is a self-managed database, you must also make preparations to meet the environmental requirements for DTS. For more information, see Preparations.
Procedure
-
Use one of the following methods to go to the Change Tracking Tasks page and select the region in which the change tracking instance resides.
DTS console
-
Log on to the DTS console.
-
In the left-side navigation pane, click Change Tracking.
-
In the upper-left corner of the page, select the region in which the change tracking instance resides.
DMS console
NoteThe actual operations may vary based on the mode and layout of the DMS console. For more information, see Simple mode console and Customize the layout and style of the DMS console.
-
Log on to the DMS console.
-
In the top navigation bar, move the pointer over .
-
From the drop-down list to the right of Change Tracking Tasks, select the region in which the change tracking instance resides.
-
-
Click Create Task to go to the task configuration page.
-
Optional: In the upper-right corner of the page, click New Configuration Page.
Note-
Skip this step if the Back to Previous Version button is displayed in the upper-right corner of the page.
-
Some parameters may differ between the new and previous versions of the configuration page. We recommend that you use the new configuration page.
-
-
Configure parameters in the Source Database and Consumer Network Type sections.
WarningAfter you specify the source database instance, we recommend that you read the Limits that are displayed in the upper part of the page. Otherwise, the task may fail or the tracked data cannot be consumed.
Section
Parameter
Description
N/A
Task Name
The name of the change tracking task. DTS automatically assigns a name to the task. We recommend that you specify a descriptive name that makes it easy to identify the task. You do not need to use a unique task name.
Source Database
Select Existing Connection
For this example, do not select an existing connection. Instead, configure the database details in the following fields.
Database Type
Select MySQL.
Access Method
Select Alibaba Cloud Instance.
Instance Region
Select the region where the ApsaraDB RDS for MySQL instance is located.
Replicate Data Across Alibaba Cloud Accounts
If a database instance within the current Alibaba Cloud account is used, select No.
RDS Instance ID
Select the ID of your ApsaraDB RDS for MySQL instance.
Database Account
Enter the read-only account for the ApsaraDB RDS for MySQL database, or a custom account with the REPLICATION CLIENT, REPLICATION SLAVE, SHOW VIEW, and SELECT permissions.
Database Password
The password that is used to access the database instance.
Encryption
For this example, you can keep the default setting.
Consumer Network Type
Network Type
The value of the Network Type parameter is fixed to VPC. You must select a VPC and a vSwitch. For more information, see VPCs.
Note-
After a change tracking task is configured, you cannot change the settings in the Consumer Network Type section.
-
If your change tracking client is deployed in a VPC, we recommend that you select the same VPC and vSwitch connected to the client.
-
If you track data changes over internal networks, the network latency is minimal.
-
-
In the lower part of the page, click Test Connectivity and Proceed.
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 DTS server IP whitelist.
-
If the source 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.
-
-
Configure the objects for change tracking.
-
On the Configure Objects page, configure the objects for change tracking.
Parameter
Description
Data Change Types
The Data Change Types options are selected by default and cannot be changed.
-
Data Update
DTS tracks data updates of the selected objects, including the INSERT, DELETE, and UPDATE operations.
-
Schema Update
DTS tracks the create, delete, and modify operations that are performed on all object schemas of the source instance. You must use the change tracking client to filter the data to be tracked.
Source Objects
Select one or more objects from the Source Objects section and click the
icon to add the objects to the Selected Objects section. NoteYou can select tables or databases as the objects for change tracking.
-
If you select a database as the object, DTS tracks incremental data of all objects, including new objects in the database.
-
If you select a table as the object, DTS tracks only incremental data of this table. In this case, if you want to track data changes of another table, you must add the table to the object list. For more information, see Modify the objects for change tracking.
-
-
Click Next: Advanced Settings to configure advanced settings.
For this example, you can keep the default settings. You can also configure the parameters based on your business requirements.
-
-
In the lower part of the page, click Next: Save Task Settings and Precheck.
-
To view the parameters to be specified when you call the relevant API operation to configure the DTS task, move the pointer over Next: Save Task Settings and Precheck and click Preview OpenAPI parameters.
-
If you do not need to view or have viewed the parameters, click Next: Save Task Settings and Precheck in the lower part of the page.
Note-
Before you can start the change tracking task, DTS performs a precheck. You can start the change tracking task only after the task passes the precheck.
-
If the task fails to pass the precheck, click View Details next to each failed item. After you troubleshoot the issues based on the error message, you can run a precheck again.
-
If an alert is generated for an item during the precheck, perform the following operations based on the scenario:
-
If an alert item cannot be ignored, click View Details next to the failed item and troubleshoot the issues. Then, run a precheck again.
-
If the alert item can be ignored, click Confirm Alert Details. In the View Details dialog box, click Ignore. In the message that appears, click OK. Then, click Precheck Again to run a precheck again. If you ignore the alert item, data inconsistency may occur and your business may be exposed to potential risks.
-
-
-
Purchase the instance.
-
Wait until Success Rate becomes 100%. Then, click Next: Purchase Instance.
-
On the Purchase page, specify the billing method of the change tracking instance. The following table describes the parameters.
Parameter
Description
Billing method
-
Subscription: You pay for your subscription when you create an instance. The subscription billing method is more cost-effective than the pay-as-you-go billing method for long-term use. You are offered lower prices for longer subscription durations.
-
Pay-as-you-go: A pay-as-you-go instance is billed on an hourly basis. We recommend that you select the pay-as-you-go billing method for short-term use. If you no longer require a pay-as-you-go instance, you can release the instance to reduce costs.
Resource Group Settings
The resource group to which the instance belongs. Default value: default resource group. For more information, see What is Resource Management?
Billing Type of Change Tracking Instance
If you create a subscription-based change tracking instance and the source database type is MySQL, you must select a Billing Type of Change Tracking Instance.
-
If you select Full-price Configuration Fee (No Data Traffic Fee), only the configuration fee is charged, and no data traffic fee is charged.
NoteData traffic refers to the total amount of data consumed by the client from the subscription channel. It is billed at USD 0.14/GB, with a minimum charge of 1 GB. This option is suitable for subscription instances with large data volumes.
-
If you select Half-price Configuration Fee + USD 0.14/GB Data Traffic Fee, DTS will charge additional data traffic fees for the subscription instance starting from December 18, 2020.
Subscription Duration
If you select the subscription billing method, set the subscription duration and the number of instances that you want to create. The subscription duration can be one to nine months, one year, two years, three years, or five years.
NoteThis parameter is available only if you select the Subscription billing method.
-
-
Read and select the Data Transmission Service (Pay-as-you-go) Service Terms.
-
Click Buy and Start to start the change tracking task. You can view the progress of the task in the task list.
-