All Products
Search
Document Center

Data Transmission Service:Migrate data from an ApsaraDB MyBase for SQL Server instance to an ApsaraDB RDS for SQL Server instance

Last Updated:Mar 28, 2026

Data Transmission Service (DTS) lets you migrate data from an ApsaraDB MyBase for SQL Server instance to an ApsaraDB RDS for SQL Server instance with minimal downtime. This guide walks you through configuring a migration task that combines schema migration, full data migration, and incremental data migration.

Prerequisites

Before you begin, make sure that:

Important

If you set SQL Server Incremental Synchronization Mode to Log-based Parsing for Non-heap Tables and CDC-based Incremental Synchronization for Heap Tables, the hybrid log-based parsing mode is used. The following source database versions are supported:

  • Enterprise or Enterprise Evaluation edition: SQL Server 2012, 2014, 2016, 2019, or 2022

  • Standard edition: SQL Server 2016, 2019, or 2022

When to split into multiple tasks

Split the migration into multiple tasks if any of the following conditions apply to the source instance:

  • The source instance contains more than 10 databases

  • A single database backs up logs at intervals shorter than 1 hour

  • A single database executes more than 100 DDL statements per hour

  • Logs are written at a rate of 20 MB/s for a single database

  • Change data capture (CDC) needs to be enabled for more than 1,000 tables

Billing

Migration typeTask configuration feeInternet traffic fee
Schema migration and full data migrationFreeFree
Incremental data migrationCharged. See Billing overview.

Choose a migration type

DTS supports three migration types. Combine them based on your requirements.

Migration typeWhat it doesWhen to use
Schema migrationMigrates schemas of selected objects from source to destinationAlways select as the first step
Full data migrationMigrates all existing data from source to destinationRequired for initial migration
Incremental data migrationContinuously migrates data changes after full migration completesSelect to minimize downtime and keep services running during migration

For full schema migration support details, see Supported and unsupported objects.

Note DTS does not migrate foreign keys. Cascade and delete operations defined in the source database are not carried over to the destination.

Limitations

Review these limitations before configuring the task.

Source database requirements

  • The server on which the source database is deployed must have sufficient outbound bandwidth. Otherwise, the data migration speed decreases.

  • Tables to be migrated must have PRIMARY KEY or UNIQUE constraints, and all fields must be unique. Otherwise, the destination database may contain duplicate records.

  • A single migration task can migrate up to 1,000 tables when you rename tables or columns during migration. For more than 1,000 tables, configure multiple tasks or migrate at the database level instead of the table level.

  • A single migration task can migrate up to 10 databases. For more than 10 databases, configure multiple tasks.

For incremental data migration, also make sure:

  • The data logging feature is enabled. The backup mode must be set to Full, and a full physical backup must have been performed.

  • Log retention period: Insufficient log retention may cause the task to fail, or result in data inconsistency or data loss. Failing to meet these requirements also voids the DTS service level agreement (SLA).

    • Incremental migration only: retain logs for more than 24 hours

    • Full + incremental migration: retain logs for at least 7 days. After full migration completes, you can set the retention to more than 24 hours

For CDC-enabled tables, the following conditions must be met (otherwise the precheck fails):

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

  • Database owner must be sa (self-managed SQL Server) or sqlsa (ApsaraDB RDS for SQL Server)

  • Enterprise edition: SQL Server 2008 or later

  • Standard edition: SQL Server 2016 SP1 or later

  • Standard or Enterprise edition running SQL Server 2017: upgrade to a later version

Additional source database limits:

  • Do not execute DDL statements that change database or table schemas during schema migration and full data migration. This causes the migration task to fail.

  • If you perform full data migration only (without incremental), do not write to the source database during migration. To avoid data inconsistency, select all three migration types: schema migration, full data migration, and incremental data migration.

  • Do not clear source database logs before the task completes. DTS uses the fn_log function to retrieve logs, which has performance bottlenecks. Clearing logs prematurely may cause the task to fail.

  • Read-only source instances do not support DDL operation migration.

  • In hybrid log-based parsing mode, do not perform multiple add-column or drop-column operations on the same table within 10 minutes. For example, the following sequence executed within 10 minutes causes an error:

    ALTER TABLE test_table DROP COLUMN Flag;
    ALTER TABLE test_table ADD Remark nvarchar(50) not null default('');
  • If the source is an ApsaraDB RDS for SQL Server instance running the Web edition, set SQL Server Incremental Synchronization Mode to Incremental Synchronization Based on Logs of Source Database (Heap tables are not supported).

Other limitations

  • DTS does not migrate the following data types: TEXT, CURSOR, ROWVERSION, SQL_VARIANT, HIERACHYID, GEOMETRY.

  • If you use Incremental Synchronization Based on Logs of Source Database mode (non-hybrid), tables must have clustered indexes containing primary key columns. Heap tables, tables without primary keys, compressed tables, and tables with computed columns are not supported. To view heap tables, tables without primary keys, compressed tables, or tables with computed columns, see the FAQ.

  • Migrate data between compatible database versions only.

  • If CDC-enabled tables in a single migration task exceed 1,000, the precheck fails.

  • We recommend that you set the maximum number of records per second to 1,000 for the tables for which CDC is enabled in the source database.

  • Incremental data migration requires disabling triggers and foreign keys in the destination database.

  • Perform migration during off-peak hours. Full data migration uses read and write resources on both source and destination, which increases load on database servers. Concurrent INSERT operations during full migration also cause table fragmentation in the destination database, making the destination tablespace larger than the source.

  • DTS uses ROUND(COLUMN,PRECISION) to retrieve values from FLOAT and DOUBLE columns. Default precision: 38 digits for FLOAT, 308 digits for DOUBLE. Verify that these precision settings meet your requirements before starting migration.

  • DTS automatically retries failed migration tasks for up to 7 days. Before switching workloads to the destination database, stop or release any failed tasks—or revoke write permissions from DTS accounts on the destination. Otherwise, the resumed task may overwrite data in the destination with source data.

  • Do not run reindexing operations during incremental data migration. This may cause the task to fail and result in data loss. DTS also cannot migrate DDL operations on primary keys for CDC-enabled tables.

Note DTS automatically creates the destination database in the RDS instance. If the database name does not conform to ApsaraDB RDS naming conventions, create the database manually before configuring the migration task.

Supported and unsupported objects

Schema migration: supported objects

Table, view, trigger, synonym, SQL stored procedure, SQL function, plan guide, user-defined type, rule, default, and sequence.

Schema migration: unsupported objects

Assemblies, service brokers, full-text indexes, full-text catalogs, distributed schemas, distributed functions, Common Language Runtime (CLR) stored procedures, CLR scalar-valued functions, CLR table-valued functions, internal tables, system objects, and aggregate functions.

SQL operations supported for incremental data migration

Operation typeSupported SQL statements
DMLINSERT, UPDATE, DELETE.
Note

UPDATE operations that modify only large fields are not migrated.

DDLALTER TABLE (ADD COLUMN, DROP COLUMN, RENAME COLUMN only); CREATE TABLE, CREATE INDEX (partitioned tables and tables with functions are not migrated); DROP TABLE; RENAME TABLE; TRUNCATE TABLE
Note Transactional DDL operations are not migrated. For example, an SQL operation that contains DDL on multiple columns, or one that mixes DDL and DML, is not migrated. Data loss may occur.
Note DDL operations containing user-defined types are not migrated.
Note Online DDL operations are not migrated.
Note In hybrid log-based parsing mode, all common DDL operations are migrated.

Required permissions

DatabaseSchema migrationFull data migrationIncremental data migration
Source instanceRead permissions on the objects to migrateowner permission on the source databaseSee Create an account and Modify account permissions.
Destination instanceRead and write permissions on the destination database (owner permission recommended)

Configure the migration task

Step 1: Go to the Data Migration Tasks page

  1. Log on to the Data Management (DMS) console.

  2. In the top navigation bar, move the pointer over DTS, then choose DTS (DTS) > Data Migration.

Note The actual navigation may vary based on the DMS console layout. See Simple mode and Customize the layout and style of the DMS console. Alternatively, go directly to the Data Migration page of the new DTS console.

Step 2: Select the region

From the drop-down list on the right side of Data Migration Tasks, select the region where your migration instance resides.

Note In the new DTS console, select the region in the upper-left corner.

Step 3: Configure source and destination databases

Click Create Task, then configure the following parameters.

Warning

After configuring source and destination databases, read the Limits displayed at the top of the page. Skipping this step may cause the task to fail or result in data inconsistency.

Source database

ParameterDescription
Task NameA descriptive name for the task. DTS auto-generates a name, but specifying a meaningful name makes it easier to identify the task. Does not need to be unique.
Select an existing DMS database instance (optional)If you have already registered a DMS database instance, select it here. DTS auto-fills the parameters below. Otherwise, configure parameters manually.
Database TypeSelect SQL Server.
Access MethodSelect Alibaba Cloud Instance. ApsaraDB MyBase for SQL Server instances connect to DTS using this access method.
Instance RegionThe region where the source ApsaraDB MyBase for SQL Server instance resides.
Replicate Data Across Alibaba Cloud AccountsSelect No for same-account migration.
RDS Instance IDThe ID of the source ApsaraDB MyBase for SQL Server instance.
Database AccountThe database account for the source instance. See Required permissions.
Database PasswordThe password for the database account.

Destination database

ParameterDescription
Select an existing DMS database instance (optional)If you have already registered a DMS database instance, select it here. DTS auto-fills the parameters below. Otherwise, configure parameters manually.
Database TypeSelect SQL Server.
Access MethodSelect Alibaba Cloud Instance.
Instance RegionThe region where the destination ApsaraDB RDS for SQL Server instance resides.
Instance IDThe instance ID of the destination ApsaraDB RDS for SQL Server instance.
Database AccountThe database account for the destination instance. See Required permissions.
Database PasswordThe password for the database account.

Step 4: Test connectivity

Click Test Connectivity and Proceed.

DTS automatically adds its server CIDR blocks to the IP address whitelist of the Alibaba Cloud database instance. For self-managed databases on Elastic Compute Service (ECS) instances, DTS adds CIDR blocks to the ECS security group rules—but you must verify that the ECS instance can reach the database. If the database runs across multiple ECS instances, manually add the DTS CIDR blocks to the security group of each ECS instance. For self-managed databases in data centers or third-party cloud environments, manually add the DTS CIDR blocks to the database's IP address whitelist. For the full list of CIDR blocks, see Add the CIDR blocks of DTS servers.

Warning

Adding DTS CIDR blocks to your whitelist or security group introduces security risks. Before proceeding, take preventive measures: strengthen username and password security, limit exposed ports, authenticate API calls, and regularly audit whitelist and security group rules to remove unauthorized CIDR blocks. You can also connect the database to DTS through Express Connect, VPN Gateway, or Smart Access Gateway.

Step 5: Select objects and configure the synchronization mode

ParameterDescription
Migration TypesSelect the migration types for your scenario. For full migration without downtime, select Schema Migration, Full Data Migration, and Incremental Data Migration. For migration with a maintenance window, select Schema Migration and Full Data Migration only—but do not write to the source database during migration.
Processing Mode of Conflicting TablesPrecheck and Report Errors: fails the precheck if the destination contains tables with the same names as source tables. Use object name mapping to rename conflicting tables. Ignore Errors and Proceed: skips the precheck for identical table names. During full migration, conflicting records in the destination are retained (not overwritten). During incremental migration, conflicting records are overwritten. Use with caution.
SQL Server Incremental Synchronization ModeSee Choose a synchronization mode below.
Source ObjectsSelect objects from the Source Objects section and click the right-arrow icon to move them to Selected Objects. You can select columns, tables, or schemas. Selecting tables or columns excludes views, triggers, and stored procedures.
Selected ObjectsTo rename a single object, right-click it and see Map the name of a single object. To rename multiple objects at once, click Batch Edit. See Map multiple object names at a time. To filter rows with SQL conditions, right-click an object and specify conditions. See Use SQL conditions to filter data. To select which SQL operations to replicate for a specific object, right-click the object and select the operations.
Note Renaming an object with the object name mapping feature may cause other objects that depend on it to fail migration.

Choose a synchronization mode

Select SQL Server Incremental Synchronization Mode based on your source database and table types.

ModeAdvantagesDisadvantages
Log-based Parsing for Non-heap Tables and CDC-based Incremental Synchronization for Heap Tables (hybrid log-based parsing)Supports heap tables, tables without primary keys, compressed tables, and tables with computed columns. Higher stability and full DDL support.DTS creates dts_cdc_sync_ddl (trigger), dts_sync_progress (heartbeat table), and dts_cdc_ddl_history (DDL history table) in the source database, and enables CDC. SELECT INTO and TRUNCATE cannot be run on CDC-enabled tables. DTS-created triggers cannot be manually deleted.
Incremental Synchronization Based on Logs of Source Database (heap tables not supported)Does not modify source database settings.Does not support heap tables, tables without primary keys, compressed tables, or tables with computed columns. Tables must have clustered indexes containing primary key columns.
Polling and querying CDC instances for incremental synchronizationSupports migration from Amazon RDS SQL Server, Azure SQL Database, and Google Cloud SQL for SQL Server. Uses the native CDC component for stability with less network bandwidth.The DTS account must have permission to enable CDC. Incremental migration takes approximately 10 seconds to start. May have stability and performance issues when migrating multiple tables across multiple databases.
Note In hybrid log-based parsing mode, DTS also enables CDC for the source database and specific tables.

Step 6: Configure advanced settings

Click Next: Advanced Settings, then configure the following parameters.

Data verification settings

To enable data verification after migration, see Enable data verification.

Advanced settings

ParameterDescription
Dedicated Cluster for Task SchedulingBy default, DTS schedules tasks to a shared cluster. To use a dedicated cluster, purchase one first. See What is a DTS dedicated cluster?
Set AlertsSelect Yes to receive notifications when the task fails or migration latency exceeds a threshold. Configure the alert threshold and notification settings. See Configure monitoring and alerting.
Retry Time for Failed ConnectionsHow long DTS retries a failed connection after the task starts. Valid values: 10–1,440 minutes. Default: 720. We recommend that you set the parameter to a value greater than 30. If DTS reconnects within this period, the task resumes. Otherwise, the task fails. If multiple tasks share the same source or destination database, the shortest retry time takes precedence. DTS charges for the instance during retries.
Retry Time for Other IssuesHow long DTS retries failed DDL or DML operations. Valid values: 1–1,440 minutes. Default: 10. We recommend that you set the parameter to a value greater than 10. Must be shorter than Retry Time for Failed Connections.
Enable Throttling for Full Data MigrationSelect Yes to limit read/write load during full migration. Configure Queries per second (QPS) to the source database, RPS of Full Data Migration, and BPS of Full Data Migration as needed. Available only when Full Data Migration is selected.
Enable Throttling for Incremental Data MigrationSelect Yes to limit load during incremental migration. Configure RPS of Incremental Data Migration and BPS of Incremental Data Migration as needed. Available only when Incremental Data Migration is selected.
Environment TagTag the instance as Regular or Production Environment based on your environment.
Configure ETLSelect Yes to enable the extract, transform, and load (ETL) feature and enter data processing statements. See Configure ETL and What is ETL?

Step 7: Run the precheck

Click Next: Save Task Settings and Precheck.

Note To preview the API parameters for this task configuration, hover over Next: Save Task Settings and Precheck and click Preview OpenAPI parameters.

DTS runs a precheck before the migration starts. The task can only proceed after the precheck passes.

  • If a check item fails, click View Details, resolve the issue, then click Precheck Again.

  • If a check item shows an alert:

    • If the alert cannot be ignored, click View Details, fix the issue, then rerun the precheck.

    • If the alert can be safely ignored, click Confirm Alert Details > Ignore > OK > Precheck Again. Ignoring an alert may result in data inconsistency.

Step 8: Purchase the instance

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

On the Purchase Instance page, configure the following:

SectionParameterDescription
New Instance ClassResource Group SettingsThe resource group for the migration instance. Default: default resource group. See What is Resource Management?
Instance ClassThe instance class determines migration speed. Select based on your data volume and timeline. See Specifications of data migration instances.

Step 9: Start the migration

  1. Read and select the Data Transmission Service (Pay-as-you-go) Service Terms check box.

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

The task appears in the task list. Monitor its progress from there.

What's next

After the migration task completes and incremental migration latency drops to near zero:

  1. Stop writes to the source database.

  2. Wait for the incremental migration latency to reach 0 seconds.

  3. Switch your application connection strings to the destination ApsaraDB RDS for SQL Server instance.

  4. Verify data consistency between the source and destination.

  5. Stop or release the DTS migration task.