All Products
Search
Document Center

Data Transmission Service:Synchronize data from a Db2 for LUW database to a PolarDB-X 2.0 instance

Last Updated:Mar 28, 2026

Data Transmission Service (DTS) lets you continuously synchronize data from a self-managed Db2 for LUW database to a PolarDB-X 2.0 instance. The synchronization covers a full initial load and ongoing incremental changes captured through the Change Data Capture (CDC) replication mechanism built into Db2 for LUW.

Prerequisites

Before you begin, make sure that you have:

  • A Db2 for LUW source database and a PolarDB-X 2.0 destination instance. The PolarDB-X instance must be compatible with MySQL 5.7. For supported synchronization scenarios, see Overview of data synchronization scenarios

  • Enough free storage space on the destination instance to hold all data from the source database

  • Data logging enabled on the Db2 for LUW database. If data logging is disabled, the precheck fails and the task cannot start

    Synchronization typeLog retention requirement
    Incremental data synchronization onlyMore than 24 hours
    Full data synchronization + incremental data synchronizationAt least 7 days. After the full data synchronization phase completes, you can set the retention period to more than 24 hours. Otherwise, DTS may fail to obtain the data logs and the task may fail. In exceptional circumstances, data inconsistency or loss may occur.
  • CDC enabled for every table you want to synchronize

  • Log archiving configured for the Db2 for LUW database. See logarchmeth1 and logarchmeth2

  • The required database account permissions granted:

    DatabaseRequired permissionReference
    Db2 for LUWDBADM authorityCreating group and user IDs, Authorities overview
    PolarDB-X 2.0Read and write permissions on the destination databaseManage accounts

Billing

Synchronization typeCost
Schema synchronization and full data synchronizationFree
Incremental data synchronizationCharged. See Billing overview

Supported synchronization topologies

  • One-way one-to-one synchronization

  • One-way one-to-many synchronization

  • One-way cascade synchronization

  • One-way many-to-one synchronization

For details, see Synchronization topologies.

Supported DML operations

DTS synchronizes INSERT, UPDATE, and DELETE statements. DDL synchronization is not supported for this source-destination pair.

Limitations

Limitations that apply to all synchronization types

CategoryLimitation
Source bandwidthThe server hosting the source database must have sufficient outbound bandwidth. Insufficient bandwidth reduces synchronization speed.
Table constraintsTables to be synchronized must have a PRIMARY KEY or UNIQUE constraint, with all fields unique. Without this, the destination database may contain duplicate records.
Table countIf you select tables as synchronization objects and plan to rename tables or columns in the destination database, a single task supports up to 5,000 tables. For more than 5,000 tables, configure multiple tasks or synchronize the entire database instead.
Foreign key behaviorDTS synchronizes foreign keys from the source to the destination database. During full data synchronization and incremental data synchronization, DTS temporarily disables constraint checks and cascade operations on foreign keys at the session level. Cascade UPDATE or DELETE operations on the source during synchronization may cause data inconsistency.
Write behaviorWrite data to the destination database only through DTS during the synchronization period. After synchronization is complete, use Data Management (DMS) to run DDL statements online. See Perform lock-free DDL operations.
Tablespace sizeAfter initial full data synchronization, concurrent INSERT operations cause table fragmentation in the destination. As a result, the destination tablespace may be larger than the source.
Performance impactThe initial full data synchronization phase consumes read and write resources on both source and destination database servers. Evaluate the impact before you start, and run synchronization during off-peak hours when possible.

Limitations that apply to incremental data synchronization only

DTS captures incremental data using the CDC replication technology built into Db2 for LUW. CDC monitors transaction logs and applies changes to the destination.

CategoryLimitation
Synchronization latency accuracyDTS calculates synchronization latency by comparing the timestamp of the latest synchronized record in the destination against the current source timestamp. If no DML operations occur on the source for an extended period, the reported latency may be inaccurate. To update the latency, run a DML operation on the source. If you synchronize an entire database, create a heartbeat table that receives a write every second.
Primary/secondary switchoverIf a primary/secondary switchover occurs on the source while the task is running, the task fails.
CDC-specific restrictionsFor the full list of CDC restrictions, see General data restrictions for SQL Replication.

Create a synchronization task

The task configuration follows five steps: configure source and destination databases, test connectivity, select objects, run the precheck, and purchase the instance.

Step 1: Configure source and destination databases

  1. Go to the Data Synchronization page in the DTS console.

    Alternatively, log on to the DMS console, move the pointer over Data + AI in the top navigation bar, and choose DTS (DTS) > Data Synchronization.
  2. In the upper-left corner, select the region where the synchronization instance will reside.

  3. Click Create Task. In the Create Data Synchronization Task wizard, configure the source and destination database parameters:

    Source database

    ParameterDescription
    Task NameA name for the task. DTS generates a default name. Specify a descriptive name to make the task easy to identify. The name does not need to be unique.
    Database TypeSelect DB2 LUW.
    Connection TypeSelect the access method based on where your source database is deployed. This example uses Self-managed Database on ECS. If your source is a self-managed database, set up the network environment first. See Preparation overview.
    Instance RegionThe region where the Db2 for LUW database resides.
    ECS Instance IDThe ID of the Elastic Compute Service (ECS) instance hosting the Db2 for LUW database.
    Port NumberThe service port of the Db2 for LUW database. Default: 50000.
    Database NameThe name of the source Db2 for LUW database containing the objects to synchronize.
    Database AccountThe Db2 for LUW database account. See Prerequisites for required permissions.
    Database PasswordThe password for the database account.

    Destination database

    ParameterDescription
    Database TypeSelect PolarDB-X 2.0.
    Connection TypeSelect Alibaba Cloud Instance.
    Instance RegionThe region where the destination PolarDB-X instance resides.
    Instance IDThe ID of the destination PolarDB-X cluster.
    Database AccountThe PolarDB-X database account. See Prerequisites for required permissions.
    Database PasswordThe password for the database account.

Step 2: Test connectivity

Click Test Connectivity and Proceed.

DTS automatically adds its server CIDR blocks to the whitelist or security group of Alibaba Cloud database instances. For self-managed databases on ECS, DTS adds its CIDR blocks to the ECS security group — make sure the ECS instance can reach the database. If the database runs across multiple ECS instances, manually add the DTS CIDR blocks to each instance's security group rules. For self-managed databases in a data center or hosted by a third-party cloud provider, manually add the DTS CIDR blocks to the database whitelist. See CIDR blocks of DTS servers.

Warning

Adding DTS CIDR blocks to whitelists or security groups introduces security exposure. Before proceeding, take preventive measures such as strengthening credentials, limiting exposed ports, authenticating API calls, reviewing whitelist rules regularly, and removing unauthorized CIDR blocks. Consider connecting via Express Connect, VPN Gateway, or Smart Access Gateway as a more secure alternative.

Step 3: Select objects and configure settings

Basic settings

ParameterDescription
Synchronization TypesIncremental Data Synchronization is selected by default. You can also select Full Data Synchronization. Schema Synchronization is not available for this source-destination pair.
Processing Mode of Conflicting TablesPrecheck and Report Errors: checks whether the destination contains tables with the same names as the source. If identical names exist, the precheck fails and the task cannot start. To resolve naming conflicts, use the object name mapping feature. See Map object names. Ignore Errors and Proceed: skips the identical table name check. During full data synchronization, records with matching primary or unique key values are retained in the destination without being overwritten. During incremental data synchronization, matching records in the destination are overwritten. If the schemas differ between source and destination, some columns may not be synchronized or the task may fail.
Select ObjectsIn the Source Objects panel, select the objects to synchronize and click the arrow icon to move them to the Selected Objects panel. You can select columns, tables, or databases. If you select tables or columns, DTS does not synchronize views, triggers, or stored procedures.
Rename databases and tablesTo rename a single object, right-click it in the Selected Objects panel. See Map the name of a single object. To rename multiple objects at once, click Batch Edit in the upper-right corner of the Selected Objects panel. See Map multiple object names at a time.
Filter dataSpecify WHERE conditions to filter rows. See Specify filter conditions.
Select SQL operations to synchronizeIn the Selected Objects panel, right-click an object and select the SQL operations to synchronize.

Advanced settings

ParameterDescription
Monitoring and AlertingSelect Yes to configure alerts for task failures or high synchronization latency. Specify the alert threshold and notification contacts. See Configure monitoring and alerting. Select No to skip alerting.
Retry Time for Failed ConnectionsThe time window (in minutes) during which DTS retries failed connections after the task starts. Valid values: 10–1440. Default: 720. Set this to at least 30 minutes. If DTS reconnects within the window, the task resumes automatically. If the window expires without a successful connection, the task fails. If multiple tasks share the same source or destination database, the shortest retry window among them takes effect. DTS charges for the instance during retry periods.

Step 4: Run the precheck

Click Next: Save Task Settings and Precheck.

To review the OpenAPI parameters for this configuration before saving, hover over the button and click Preview OpenAPI parameters.

DTS runs a precheck before the task starts. If the precheck fails:

  • For a failed item: click View Details, fix the issue, and run the precheck again.

  • For an alert item that can be ignored: click Confirm Alert Details, then click Ignore in the dialog box, and click OK. Then click Precheck Again. Ignoring alerts may cause data inconsistency.

  • For an alert item that cannot be ignored: click View Details, fix the issue, and run the precheck again.

Step 5: Purchase the instance

  1. Wait until Success Rate reaches 100%, then click Next: Purchase Instance.

  2. On the purchase page, configure the billing and instance settings:

    ParameterDescription
    Billing MethodSubscription: pay upfront for a fixed term. More cost-effective for long-term use. Pay-as-you-go: billed hourly. Suitable for short-term use. Release the instance when no longer needed to stop charges.
    Resource Group SettingsThe resource group for the synchronization instance. Default: default resource group. See What is Resource Management?
    Instance ClassDTS instance classes vary in synchronization speed. See Instance classes of data synchronization instances.
    Subscription DurationAvailable only for the Subscription billing method. Options: 1–9 months, 1 year, 2 years, 3 years, or 5 years.
  3. Read and select Data Transmission Service (Pay-as-you-go) Service Terms.

  4. Click Buy and Start, then click OK in the confirmation dialog.

The task appears in the task list. You can monitor its progress from there.

What's next