All Products
Search
Document Center

Data Transmission Service:Synchronize data from an ApsaraDB RDS for SQL Server instance to DataHub

Last Updated:Aug 28, 2026

Data Transmission Service (DTS) supports synchronizing data from ApsaraDB RDS for SQL Server to DataHub.

Prerequisites

  • The source ApsaraDB RDS for SQL Server instance is created. For more information, see create and use an RDS SQL Server instance.

    Important

    For the supported versions of the source RDS SQL Server instance, see Data synchronization scenarios.

  • The DataHub service is activated, and a project is created to receive the synchronized data. For more information, see Quick start (synchronization example) and Manage projects.

  • We recommend splitting a synchronization task into multiple tasks if the source instance meets any of the following conditions:

    • The source instance has more than 10 databases.

    • Log backups are performed more than once per hour for a single database.

    • More than 100 Data Definition Language (DDL) operations are performed per hour on a single database.

    • The log generation rate for a single database exceeds 20 MB/s.

    • You must enable change data capture (CDC) on more than 1,000 tables.

Precautions

Note

DTS does not synchronize foreign keys from the source database to the destination database. Therefore, cascade and delete operations on the source database are not synchronized to the destination database.

Type

Description

Source database limitations

  • Tables for synchronization must have a primary key or unique constraint. Otherwise, duplicate data may occur in the destination database.

  • If a data synchronization task synchronizes more than 5,000 tables at the table level and requires object edits, such as mapping column names, split the tables into multiple tasks.

  • A single data synchronization task supports a maximum of 10 databases. If you exceed this limit, you risk stability and performance issues. In this case, split the tables into multiple tasks.

  • If you configure a task to synchronize specific objects instead of an entire database, you cannot synchronize objects that have the same table name but different schema names to the same destination database within that task.

  • Data Transmission Service (DTS) uses the fn_log function to obtain logs from the source database. This function has performance bottlenecks. Do not clean up source database logs prematurely. Otherwise, the task may fail.

  • Transaction logs:

    • Enable transaction logs, set the recovery model to Full, and make sure that a full physical backup has been completed.

    • For an incremental data synchronization task, DTS requires that transaction logs in the source database are retained for at least 24 hours. For a task that includes both full data synchronization and incremental data synchronization, transaction logs must be retained for at least 7 days. After the full data synchronization is complete, you can change the retention period to 24 hours or more. If DTS cannot obtain the transaction logs because the retention period is shorter than required, the task may fail. In extreme cases, this can lead to data inconsistency or loss. Issues that arise from a log retention period shorter than the DTS requirement are not covered by the service level agreement (SLA).

  • To enable Change Data Capture (CDC) for tables in the source database, you must meet the following conditions. Otherwise, the precheck fails.

    • The value of the srvname field in the sys.sysservers view must be the same as the return value of the SERVERPROPERTY function.

    • If the source database is a self-managed SQL Server, the database owner must be sa. If the source database is an ApsaraDB RDS for SQL Server instance, the database owner must be sqlsa.

    • If the source database is Enterprise Edition, it must be SQL Server 2008 or later.

    • If the source database is Standard Edition, it must be SQL Server 2016 SP1 or later.

    • If the source database is SQL Server 2017 (Standard or Enterprise Edition), upgrade it to a later version.

  • If the source database is an Azure SQL Database, a single synchronization instance can synchronize data from only one database.

  • If the source database is an ApsaraDB RDS for SQL Server instance, disable the Transparent Data Encryption (TDE) feature to ensure the stability of the synchronization instance. For more information, see Disable TDE.

  • If you use the sp_rename command to modify the names of objects, such as stored procedures, in the source database before the schema synchronization task runs, the task may produce unexpected results or fail.

    Note

    We recommend that you use the ALTER command to rename objects in the database.

  • In hybrid log parsing mode, you cannot perform multiple operations to add or drop columns in quick succession (less than 10 minutes apart). For example, running the following SQL statements consecutively will cause the task to fail.

    ALTER TABLE test_table DROP COLUMN Flag;
    ALTER TABLE test_table ADD Remark nvarchar(50) not null default('');
  • Do not perform DDL operations that change database or table schemas during schema synchronization, as this will cause the task to fail.

  • We recommend that you keep the READ_COMMITTED_SNAPSHOT transaction processing mode parameter for the source database enabled during a full data synchronization task to prevent shared locks from affecting data writes. Otherwise, issues such as data inconsistency and instance failures may occur. Any resulting exceptions are not covered by the DTS SLA.

Other limitations

  • Only incremental synchronization and schema synchronization are supported. Full synchronization is not supported.

  • The maximum length of a single STRING field in the destination DataHub is 2 MB.

  • Requirements for synchronized objects:

    • Schema synchronization is supported for the following object types: tables, views, functions, and procedures.

      Warning

      Because this scenario involves data synchronization between heterogeneous databases, data types may not map one-to-one. This can cause task failure or data loss. Carefully evaluate the business impact of data type mapping. For more information, see Data type mappings for schema synchronization.

    • Schema synchronization is not supported for the following objects: assemblies, service broker, full-text indexes, full-text catalogs, distributed schemas, distributed functions, CLR stored procedures, CLR scalar-valued functions, CLR table-valued functions, internal tables, systems, and aggregate functions.

    • Synchronization is not supported for data that uses the CURSOR, ROWVERSION, SQL_VARIANT, HIERARCHYID, POLYGON, GEOMETRY, or GEOGRAPHY data types, or for user-defined types that are created by using the CREATE TYPE command.

    • Synchronization of tables that contain computed columns is not supported.

    • Synchronization of the following objects is not supported: INDEX, trigger, FK, FULL_TEXT_INDEX, DATATYPE, DEFAULT, SYNONYM, CATALOG, PLAN_GUIDE, DEFAULT_CONSTRAINT, UK, CK, and SEQUENCE.

  • To ensure accurate latency monitoring for incremental data synchronization, DTS creates specific objects in the source database based on the selected mode. In log parsing mode, DTS creates the dts_cdc_sync_ddl trigger, the dts_sync_progress heartbeat table, and the dts_cdc_ddl_history DDL history table. In hybrid mode, DTS creates the dts_cdc_sync_ddl trigger, the dts_sync_progress heartbeat table, and the dts_cdc_ddl_history DDL history table, and also enables CDC at the database level and for some tables. The rate of data changes on tables with CDC enabled should not exceed 1,000 RPS.

  • Before you start a data synchronization task, evaluate the performance of the source and destination databases. Also, run the task during off-peak hours. Full data initialization consumes read and write resources on both the source and destination databases, which can increase the database load.

  • Full data initialization performs concurrent INSERT operations, which can cause fragmentation in the tables of the destination database. As a result, the table space in the destination instance may be larger than in the source instance after initialization.

  • During DTS synchronization, do not write data to the destination database from other sources. This can cause data inconsistency. For example, if you use Data Management Service (DMS) to perform online DDL changes while other data is being written to the destination, data loss may occur in the destination database.

  • Do not rebuild indexes during synchronization. This can cause task failure or even data loss.

    Note

    You cannot perform DDL operations related to the primary key on a table for which CDC is enabled.

  • If the number of tables with CDC enabled in a single synchronization task exceeds 1,000, the precheck fails.

  • If you need to write more than 64 KB of data to a single field in a CDC-enabled table, you must use the exec sp_configure 'max text repl size', -1; command to adjust the configuration of the source database in advance.

    Note

    By default, the maximum size of a single field that a CDC job can process is 64 KB.

  • If you use the Modify Objects to be Synchronized feature, you cannot remove databases from the task.

  • Multiple synchronization instances that use the same SQL Server database as a source have independent incremental data capture modules.

  • If a task fails, DTS support staff will attempt to restore it within eight hours. During restoration, they may restart the task or adjust its parameters.

    Note

    Only DTS task parameters are modified—not database parameters. Parameters that may be adjusted include those listed in Modify instance parameters.

  • SQL Server is a commercial, closed-source database. Due to known or unknown characteristics of its log format, issues can arise during incremental change data capture (CDC) and parsing by DTS. Before using DTS for incremental synchronization or migration from a SQL Server source in a production environment, perform comprehensive proof-of-concept (POC) testing. Your tests should cover all business change scenarios, schema modifications, and peak-load stress tests. Ensuring that your production business logic is identical to what was tested in the POC phase is critical for the stable and efficient operation of DTS.

  • During incremental synchronization, partially rolled back transactions on the source are not supported. The rollback operation may be lost.

Special cases

When the source instance is an ApsaraDB RDS for SQL Server, DTS creates an rdsdt_dtsacct account in the source instance for data synchronization. Do not delete this account or change its password while the task is running, or the task may fail. For more information, see System account descriptions.

Billing

Synchronization type

Pricing

Schema synchronization and full data synchronization

Free of charge.

Incremental data synchronization

Charged. For more information, see Billing overview.

Supported synchronization topologies

  • One-to-one one-way synchronization

  • One-to-many one-way synchronization

  • Many-to-one one-way synchronization

For more information about the synchronization topologies and related precautions, see Synchronization topologies.

SQL operations that can be synchronized

Operation type

SQL statement

DML

INSERT、UPDATE、DELETE

Note

DTS does not synchronize UPDATE statements that only update a large field.

Permissions required for database accounts

Database

Required permission

Account creation and authorization method

Source ApsaraDB RDS for SQL Server instance

The owner permission on the objects to be synchronized.

Create standard, privileged, and global read-only accounts and Modify the permissions of an account.

Procedure

  1. Go to the data synchronization task list page in the destination region. You can do this in one of two ways.

    DTS console

    1. Log on to the DTS console.

    2. In the navigation pane on the left, click Data Synchronization.

    3. In the upper-left corner of the page, select the region where the synchronization instance is located.

    DMS console

    Note

    The actual steps may vary depending on the mode and layout of the DMS console. For more information, see Simple mode console and Customize DMS console layout and style.

    1. Log on to the DMS console.

    2. In the top menu bar, choose Data + AI > DTS (DTS) > Data Synchronization.

    3. To the right of Data Synchronization Tasks, select the region of the synchronization instance.

  2. Click Create Task to open the task configuration page.

  3. Configure the source and destination databases.

    Category

    Configuration

    Description

    N/A

    Task Name

    DTS automatically generates a task name. We recommend that you specify a descriptive name for easy identification. The name does not need to be unique.

    Source Database

    Select Existing Connection

    • Select the registered database instance with DTS from the drop-down list. The database information below is automatically configured.

      Note

      In the DMS console, this configuration item is Select a DMS database instance.

    • If you have not registered the database instance or do not need to use a registered instance, manually configure the database information below.

    Database Type

    Select SQL Server.

    Access Method

    Select Alibaba Cloud Instance.

    Instance Region

    Select the region where the source instance resides.

    Replicate Data Across Alibaba Cloud Accounts

    In this example, the synchronization is performed between instances that belong to the same Alibaba Cloud account. Select No.

    RDS Instance ID

    Select the ID of the source instance.

    Database Account

    Enter the database account of the source ApsaraDB RDS for SQL Server instance. For more information about the permissions that are required, see Permissions required for database accounts.

    Database Password

    Enter the password for the specified database account.

    Encryption

    Select Non-encrypted or SSL-encrypted.

    • If SSL encryption is not enabled for the source database, select Non-encrypted.

    • If SSL encryption is enabled for the source database, select SSL-encrypted. DTS trusts the server certificate by default.

    Destination Database

    Select Existing Connection

    • Select the registered database instance with DTS from the drop-down list. The database information below is automatically configured.

      Note

      In the DMS console, this configuration item is Select a DMS database instance.

    • If you have not registered the database instance or do not need to use a registered instance, manually configure the database information below.

    Database Type

    Select DataHub.

    Access Method

    Select Alibaba Cloud Instance.

    Instance Region

    Select the region where the destination DataHub instance resides.

    Project

    Select the Project of the destination DataHub instance.

  4. After completing the configuration, click Test Connectivity and Proceed at the bottom of the page.

    Note
    • Ensure that you add the CIDR blocks of the DTS servers (either automatically or manually) to the security settings of both the source and destination databases to allow access. For more information, see Add the IP address whitelist of DTS servers.

    • If the source or destination is a self-managed database (i.e., the Access Method is not Alibaba Cloud Instance), you must also click Test Connectivity in the CIDR Blocks of DTS Servers dialog box.

  5. Configure the task objects.

    1. On the Configure Objects page, specify the objects to synchronize.

      Configuration

      Description

      Synchronization Types

      Incremental Data Synchronization is selected by default. By default, you also need to select Schema Synchronization.

      Processing Mode of Conflicting Tables

      • Precheck and Report Errors: Checks for tables with the same names in the destination database. If any tables with the same names are found, an error is reported during the precheck and the data synchronization task does not start. Otherwise, the precheck is successful.

        Note

        If you cannot delete or rename the table with the same name in the destination database, you can map it to a different name in the destination. For more information, see Object name mapping.

      • Ignore Errors and Proceed: Skips the check for tables with the same name in the destination database.

        Warning

        Selecting Ignore Errors and Proceed may cause data inconsistency and put your business at risk. For example:

        • If the table schemas are consistent and a record in the destination database has the same primary key or unique key value as a record in the source database:

          • During full data synchronization, DTS retains the destination record and skips the source record.

          • During incremental synchronization, DTS overwrites the destination record with the source record.

        • If the table schemas are inconsistent, data initialization may fail. This can result in only partial data synchronization or a complete synchronization failure. Use with caution.

      Naming Rules of Additional Columns

      When DTS synchronizes data to DataHub, it adds some additional columns to the destination topic. If the names of the additional columns conflict with existing columns in the destination topic, the data synchronization task will fail. You need to set Naming Rules of Additional Columns to New Rule or Previous Rule based on your business requirements.

      Warning

      Before you select an additional column rule, you need to evaluate whether the additional columns conflict with existing columns in the destination topic. Otherwise, the task may fail or data may be lost. For more information about the rules and definitions of additional columns, see Additional column names and definitions.

      Case Policy for Destination Object Names

      Configure the case-sensitivity policy for database, table, and column names in the destination instance. By default, the DTS default policy is selected. You can also choose to use the default policy of the source or destination database. For more information, see Case policy for destination object names.

      Source Objects

      In the Source Objects box, click the objects, and then click 向右 to move them to the Selected Objects box.

      Note

      You can select objects at the database, table, or column level. If you select only tables or columns, DTS does not synchronize other object types (such as views, triggers, and stored procedures).

      Selected Objects

      • To rename a single object in the destination instance, right-click the object in the Selected Objects box. For more information, see Map a single object name.

      • To rename multiple objects in bulk, click Batch Edit in the upper-right corner of the Selected Objects box. For more information, see Map multiple object names in bulk.

      Note
      • To select the SQL operations to be synchronized at the database or table level, right-click the object to be synchronized in Selected Objects, and then select the required SQL operations in the dialog box that appears.

      • To set WHERE conditions for data filtering, right-click the table to be synchronized in Selected Objects, and then set filter conditions in the dialog box that appears. For more information, see Filter task data with an SQL condition.

      • If you use the object name mapping feature, other objects that depend on this object may fail to be synchronized.

    2. Click Next: Advanced Settings.

      Configuration

      Description

      Dedicated Cluster for Task Scheduling

      By default, DTS uses a shared cluster for tasks, so you do not need to make a selection. For greater task stability, you can purchase a dedicated cluster to run the DTS synchronization task. For more information, see What is a DTS dedicated cluster?.

      Retry Time for Failed Connections

      If the connection to the source or destination database fails after the synchronization task starts, DTS reports an error and immediately begins to retry the connection. The default retry duration is 720 minutes. You can customize the retry time to a value from 10 to 1,440 minutes. We recommend a duration of 30 minutes or more. If the connection is restored within this period, the task resumes automatically. Otherwise, the task fails.

      Note
      • If multiple DTS instances (e.g., Instance A and B) share a source or destination, DTS uses the shortest configured retry duration (e.g., 30 minutes for A, 60 for B, so 30 minutes is used) for all instances.

      • DTS charges for task runtime during connection retries. Set a custom duration based on your business needs, or release the DTS instance promptly after you release the source/destination instances.

      Retry Time for Other Issues

      If a non-connection issue (e.g., a DDL or DML execution error) occurs, DTS reports an error and immediately retries the operation. The default retry duration is 10 minutes. You can also customize the retry time to a value from 1 to 1,440 minutes. We recommend a duration of 10 minutes or more. If the related operations succeed within the set retry time, the synchronization task automatically resumes. Otherwise, the task fails.

      Important

      The value of Retry Time for Other Issues must be less than that of Retry Time for Failed Connections.

      Enable Throttling for Incremental Data Synchronization

      You can also limit the incremental synchronization rate to reduce pressure on the destination database by setting RPS of Incremental Data Synchronization and Data synchronization speed for incremental synchronization (MB/s).

      Environment Tag

      You can select an environment tag to identify the instance based on your business requirements. In this example, you do not need to select a tag.

      Configure ETL

      Choose whether to enable the extract, transform, and load (ETL) feature. For more information, see What is ETL? Valid values:

      Monitoring and Alerting

      Choose whether to set up alerts. If the synchronization fails or the latency exceeds the specified threshold, DTS sends a notification to the alert contacts.

  6. Save the task and perform a precheck.

    • To view the parameters for configuring this instance via an API operation, hover over the Next: Save Task Settings and Precheck button and click Preview OpenAPI parameters in the tooltip.

    • If you have finished viewing the API parameters, click Next: Save Task Settings and Precheck at the bottom of the page.

    Note
    • Before a synchronization task starts, DTS performs a precheck. You can start the task only if the precheck passes.

    • If the precheck fails, click View Details next to the failed item, fix the issue as prompted, and then rerun the precheck.

    • If the precheck generates warnings:

      • For non-ignorable warning, click View Details next to the item, fix the issue as prompted, and run the precheck again.

      • For ignorable warnings, you can bypass them by clicking Confirm Alert Details, then Ignore, and then OK. Finally, click Precheck Again to skip the warning and run the precheck again. Ignoring precheck warnings may lead to data inconsistencies and other business risks. Proceed with caution.

  7. Purchase the instance.

    1. When the Success Rate reaches 100%, click Next: Purchase Instance.

    2. On the Purchase page, select the billing method and link specifications for the data synchronization instance. For more information, see the following table.

      Category

      Parameter

      Description

      New Instance Class

      Billing Method

      • Subscription: You pay upfront for a specific duration. This is cost-effective for long-term, continuous tasks.

      • Pay-as-you-go: You are billed hourly for actual usage. This is ideal for short-term or test tasks, as you can release the instance at any time to save costs.

      Resource Group Settings

      The resource group to which the instance belongs. The default is default resource group. For more information, see What is resource management?.

      Instance Class

      DTS offers synchronization specifications at different performance levels that affect the synchronization rate. Select a specification based on your business requirements. For more information, see Data synchronization link specifications.

      Subscription Duration

      In subscription mode, select the duration and quantity of the instance. Monthly options range from 1 to 9 months. Yearly options include 1, 2, 3, or 5 years.

      Note

      This option appears only when the billing method is Subscription.

    3. Read and select the checkbox for Data Transmission Service (Pay-as-you-go) Service Terms.

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

      You can monitor the task progress on the data synchronization page.