Use Data Transmission Service (DTS) to migrate data from Amazon RDS for SQL Server to ApsaraDB RDS for SQL Server with minimal downtime.
Choose a migration method
Two methods are available. Select one based on your configuration needs:
| RDS one-stop cloud migration | DTS migration | |
|---|---|---|
| Entry point | RDS console | DTS console |
| Task types | Schema migration, full data migration, and incremental migration (all included by default) | Select individually: schema migration, full data migration, and incremental migration |
| Advanced configuration | Throttling and data verification | Throttling, ETL, retry settings, dedicated cluster, data verification, monitoring and alerting |
| Best for | Quick migration with standard settings | Custom migration requiring granular control |
Prerequisites
Before you begin, make sure you have:
Connected the Amazon RDS for SQL Server database to Alibaba Cloud so that DTS can access it. For instructions, see Connect databases from the AWS platform to Alibaba Cloud
Created a target RDS for SQL Server instance with storage capacity greater than that of the source database. For instructions, see Quickly create and use an RDS SQL Server instance
Granted the required permissions to the database accounts used for the migration task
Database account permissions
| Database | Schema migration | Full migration | Incremental migration |
|---|---|---|---|
| Amazon RDS for SQL Server (source) | SELECT | SELECT | db_owner |
| RDS for SQL Server instance (destination) | Read and write | Read and write | Read and write |
The db_owner permission on Amazon RDS for SQL Server supports enabling database-level Change Data Capture (CDC) for stored procedures.
For instructions on granting permissions on the destination instance, see Create standard, privileged, and global read-only accounts and Modify account permissions. For the source Amazon RDS for SQL Server, contact AWS.
Limitations
Source database
Version requirements:
Enterprise Edition: version 2008 or later
Standard Edition: version 2016 SP1 or later
SQL Server 2017 (Standard or Enterprise Edition): upgrade the instance before migration
Scale: A single migration task supports a maximum of 10 databases. Split larger migrations into multiple tasks to avoid stability and performance issues.
Table requirements: Tables must have primary keys or UNIQUE constraints with unique field values, or duplicate data may appear in the destination database.
Object selection: If you migrate specific objects instead of an entire database, you cannot migrate tables that have the same name but different schema names to the same destination database.
Read-only instances: Not supported as a source database.
Renaming objects: Use the
ALTERcommand to rename objects before migration. Usingsp_renamebefore the initial schema synchronization task may cause task failure or unexpected results.`READ_COMMITTED_SNAPSHOT`: Enable this parameter on the source database during full data migration to prevent shared locks from affecting writes. Exceptions caused by this setting being disabled are not covered by the DTS SLA.
Bandwidth: The server hosting the source database must have sufficient outbound bandwidth, or migration speed will be affected.
Log retention
| Migration type | Minimum log retention period |
|---|---|
| Incremental migration only | More than 24 hours |
| Full + incremental migration | At least 7 days |
If the log retention period is shorter than required, the DTS task may fail, and data inconsistency or data loss may occur in extreme cases. Such issues are not covered by the DTS SLA.
Operations during migration
During initial schema synchronization and full data migration, do not perform DDL operations that change database or table schemas.
If you run only full data migration (without incremental migration), do not write new data to the source instance during the migration. To maintain data consistency throughout, select schema migration, full data migration, and incremental migration together.
Incremental migration (CDC)
Table limit: DTS polls the CDC instance of each table to get incremental data. Do not include more than 1,000 tables per migration task, or task latency and instability may occur.
CDC table limit: If the number of tables with CDC enabled in a single task exceeds 1,000 (or the configured maximum), the precheck fails.
CDC data retention: By default, the CDC component retains incremental data for 3 days. To adjust the retention period, run the following command on the source database:
exec console.sys.sp_cdc_change_job @job_type = 'cleanup', @retention = <time>;<time>is in minutes. If the number of daily incremental change SQL statements for a single table exceeds 10 million, set<time>to1440.Field size: If data written to a single field of a CDC-enabled table exceeds 64 KB, run the following command on the source database before starting the task:
exec sp_configure 'max text repl size', -1;DDL restrictions during incremental migration:
You cannot perform consecutive add-column or drop-column operations. For example, you cannot perform more than two DDL operations to add or remove columns within one minute.
You cannot change the CDC instance of the source database.
You cannot reindex tables.
Disable triggers and foreign keys in the destination database before starting incremental migration.
You cannot change the primary keys of tables with CDC enabled.
Data change rate: Keep the change rate for CDC-enabled tables at or below 1,000 RPS.
Latency: Incremental data migration has a latency of about 10 seconds.
Stability: In scenarios involving multiple databases and tables, stability and performance issues may occur.
DTS creates the following objects in the source database to support incremental migration. In log parsing mode, DTS creates the
dts_cdc_sync_ddltrigger, thedts_sync_progressheartbeat table, and thedts_cdc_ddl_historyDDL storage table. In hybrid incremental synchronization mode, DTS creates the same three objects and additionally enables database-level CDC and CDC for some tables.
Data types
The following data types cannot be migrated: CURSOR, ROWVERSION, SQL_VARIANT, HIERARCHYID, POLYGON, GEOMETRY, GEOGRAPHY.
FLOAT and DOUBLE precision
DTS reads FLOAT and DOUBLE values using ROUND(COLUMN, PRECISION). Default precision: FLOAT uses 38, DOUBLE uses 308. Verify that this precision meets your business requirements before starting the migration.
Other limits
Foreign keys: DTS does not migrate foreign keys. Cascade and delete operations from the source database are not replicated to the destination database.
Triggers: To migrate triggers, the database account must have Owner permissions on the destination database.
TIMESTAMP fields: If data cannot be written to a TIMESTAMP field in the destination database, full and incremental migration are not supported, which may cause data inconsistency or task failure.
Version compatibility: If you migrate data across different SQL Server versions, verify compatibility in advance.
Full migration and table fragmentation: Full data migration uses concurrent INSERT operations, which cause table fragmentation in the destination database. Table storage space in the destination will be larger than in the source after full migration.
Naming conventions: DTS automatically creates a database in the destination RDS for SQL Server instance. If the database name does not meet RDS for SQL Server naming conventions, create the database manually before configuring the migration task. For instructions, see Create a database.
Task resume: DTS automatically attempts to resume a failed task for up to 7 days. Before switching business traffic to the destination instance, end or release the task, or revoke write permissions from the DTS account using the
revokecommand. This prevents the source from overwriting data in the destination if the task resumes automatically.Multiple DTS instances: If multiple DTS instances use the same SQL Server database as the source, their incremental data ingestion modules run independently.
Task failure recovery: If a task fails, DTS support staff attempt to restore it within 8 hours. During restoration, they may restart the task or adjust its parameters. Only DTS task parameters are modified—not database parameters. For adjustable parameters, see Modify instance parameters.
SQL Server CDC and log parsing: SQL Server is a commercial closed-source database. Known or unknown format-specific limitations may cause issues with CDC and log parsing. Before enabling incremental migration for a SQL Server source in a production environment, run a comprehensive proof of concept (POC) test that covers all business change types, table schema changes, and peak-hour stress scenarios.
SQL operations supported for incremental migration
| Type | Supported operations |
|---|---|
| DML | INSERT, UPDATE, DELETE |
| DDL | CREATE TABLE; ALTER TABLE (ADD COLUMN and DROP COLUMN only); DROP TABLE; CREATE INDEX; DROP INDEX |
Unsupported DDL operations:
Transactional DDL (for example, adding multiple columns in a single statement, or combining DDL and DML in one statement)
DDL using custom data types
Online DDL
DDL using reserved keywords as column names
DDL executed by system stored procedures
TRUNCATE TABLE
Partitions or table definitions that contain functions
Billing
| Migration type | Instance configuration fee | Internet traffic fee |
|---|---|---|
| Schema migration and full data migration | Free of charge | Charged when Access Method for the destination is Public IP Address. See Billing overview. |
| Incremental data migration | Charged. See Billing overview. |
Use the RDS one-stop cloud migration feature
Go to the Data Migration tab of the target RDS for SQL Server instance.
Go to the RDS instance list.
In the upper part of the page, select the region where the target instance resides.
Click the ID of the target RDS for SQL Server instance.
In the left navigation pane, click Data Migration and Synchronization.
Click the Data Migration tab.
Click One-Stop Cloud Migration.
Configure the source and destination databases.
Section Field Description (General) Task Name A name is generated automatically. Specify a meaningful name for easier identification later. The name does not need to be unique. Source Database Database Type Set to SQL Server by default. No selection needed. Type Select AWS. Access Method Select Public IP Address or Express Connect, VPN Gateway, or Smart Access Gateway based on how Amazon RDS for SQL Server connects to Alibaba Cloud. Instance Region If Access Method is Public IP Address, select the region where the Amazon RDS for SQL Server instance resides. If the region is not listed, select the closest available region. If Access Method is Express Connect, VPN Gateway, or Smart Access Gateway, select the region where the Alibaba Cloud Virtual Private Cloud (VPC) for the connection is located. Connected VPC Select the VPC connected to Amazon RDS for SQL Server. Appears only when Access Method is Express Connect, VPN Gateway, or Smart Access Gateway. Domain Name or IP Enter the domain name or IP address of Amazon RDS for SQL Server. The domain name is recommended. Port Number Enter the service port of Amazon RDS for SQL Server. Database Account Enter the database account for Amazon RDS for SQL Server. See Database account permissions. Database Password Enter the password for the database account. Encryption Select Non-encrypted or SSL-encrypted based on whether SSL encryption is enabled on the source database. DTS trusts the server certificate by default. Destination Database Database Type Set to SQL Server by default. No selection needed. Access Method Set to Alibaba Cloud Instance by default. No selection needed. Instance Region Fixed to the region of the current RDS for SQL Server instance. Cannot be changed. Instance ID Fixed to the ID of the current RDS for SQL Server instance. Cannot be changed. Database Account Enter the database account for the current RDS for SQL Server instance. See Database account permissions. Database Password Enter the password for the database account. Encryption Select Non-encrypted or SSL-encrypted based on whether SSL encryption is enabled on the destination database. DTS trusts the server certificate by default. Click Test Connectivity and Proceed. Add the DTS server IP address shown in the dialog box to the whitelist security settings of your Amazon RDS for SQL Server, then click Test Connectivity.
ImportantAdding DTS server IP address ranges to your allowlist may expose your database to security risks. Implement basic security measures: use strong account passwords, limit open ports per CIDR block, use authentication for internal API communication, and review and restrict unnecessary CIDR blocks regularly. For instructions, see Add DTS server IP addresses to the whitelist.
Select a migration plan. The system evaluates your source database and presents two plans:
Full and Incremental Data Migration: Click Configure Objects to proceed to object selection.
Full and Incremental Backup-Based Data Migration: No further action needed.
Click View Migration Documentation to view the migration steps for the selected plan.
On the Configure Objects page, select the objects to migrate.
Field Description Method to Migrate Triggers in Source Database During incremental migration, triggers may migrate to the destination too early, causing data inconsistency. Select Manual Migration unless your objects do not include triggers (in which case, keep the default). For details, see Configure trigger migration or synchronization. Source Objects Click objects to migrate in the Source Objects box, then click the right arrow to move them to Selected Objects. You can select databases, tables, or columns. Selecting tables or columns excludes other objects (views, triggers, stored procedures). Selected Objects To rename a migration object in the destination, right-click it and edit the name. See Map database, table, and column names. To remove an object, click it, then click the remove icon. To filter rows, right-click a table and set a WHERE clause condition. See Set filter conditions. Object name mapping may cause migration failures for dependent objects. (Optional) Configure advanced settings.
Field Description Enable Throttling for Full Data Migration Set Queries per second (QPS) to the source database, RPS of Full Data Migration, and Data migration speed for full migration (MB/s) to reduce database load. Enable Throttling for Incremental Data Migration Set RPS of Incremental Data Migration and Data migration speed for incremental migration (MB/s) to reduce database load. Data Verification Mode Select Full Data Verification to validate data after migration. Set Maximum number of rows of data read per second by full verification (RPS) and Maximum amount of data read per second by full verification (MBps) to limit the verification rate. A value of 0 means no limit. Save the task and run the precheck. Click Next: Save Task Settings and Precheck. To preview the API parameters for this configuration, hover over the button and click Preview OpenAPI parameters.
- DTS runs a precheck before the migration starts. The task starts only after the precheck passes. - If the precheck fails, click View Details next to the failed item, fix the issue, and run the precheck again. - If a warning appears: for items that cannot be ignored, fix the issue and rerun. For items that can be ignored, click Confirm Alert Details, Ignore, OK, and Precheck Again. Ignoring warnings may cause data inconsistency.
When the Success Rate reaches 100%, click Next: Purchase Instance.
Purchase the instance. View migration progress on the Data Migration Tasks list page.
On the Purchase page, select an instance class.
Section Field Description New Instance Class Resource Group Settings Select the resource group for this instance. Default: default resource group. See What is Resource Management? Instance Class Select a class based on your migration scenario. The class affects migration speed. See Data migration link specifications. Read and accept the Data Transmission Service (Pay-as-you-go) Service Terms.
Click Buy and Start, then click OK in the confirmation dialog.
- Full-only migration stops automatically after completion. The task Status changes to Completed. - Migration that includes incremental migration does not stop automatically. The task continues running with Status set to Running.
Use DTS to migrate to the cloud
Go to the migration task list.
Log on to the DTS console.
In the left navigation pane, click Data Migration.
In the upper-left corner, select the region where the destination instance resides.
Click Create Task.
Configure the source and destination databases.
Section Field Description (General) Task Name A name is generated automatically. Specify a descriptive name for easier identification. The name does not need to be unique. Source Database Select Existing Connection Select an existing registered connection to auto-fill the fields below, or leave blank to enter the database information manually. To register a database, see Data Connection Management. Database Type Select SQL Server. Access Method Select Public IP Address or Express Connect, VPN Gateway, or Smart Access Gateway based on how Amazon RDS for SQL Server connects to Alibaba Cloud. Instance Region If Access Method is Public IP Address, select the region where the Amazon RDS for SQL Server instance resides. If the region is not listed, select the closest available region. If Access Method is Express Connect, VPN Gateway, or Smart Access Gateway, select the region where the Alibaba Cloud VPC for the connection is located. Replicate Data Across Alibaba Cloud Accounts Select No when using a database instance under the current Alibaba Cloud account. Appears only when Access Method is Express Connect, VPN Gateway, or Smart Access Gateway. Connected VPC Select the VPC connected to Amazon RDS for SQL Server. Appears only when Access Method is Express Connect, VPN Gateway, or Smart Access Gateway. Domain Name or IP Enter the domain name or IP address of Amazon RDS for SQL Server. The domain name is recommended. Port Number Enter the service port of Amazon RDS for SQL Server. Database Account Enter the database account for Amazon RDS for SQL Server. See Database account permissions. Database Password Enter the password for the database account. Encryption Select Non-encrypted or SSL-encrypted based on whether SSL encryption is enabled on the source database. DTS trusts the server certificate by default. Destination Database Select Existing Connection Select an existing registered connection to auto-fill the fields below, or leave blank to enter the database information manually. To register a database, see Data Connection Management. Database Type Select SQL Server. Access Method Select Alibaba Cloud Instance. Instance Region Select the region where the destination RDS for SQL Server instance resides. Instance ID Select the ID of the destination RDS for SQL Server instance. Database Account Enter the database account for the destination instance. See Database account permissions. Database Password Enter the password for the database account. Encryption Select Non-encrypted or SSL-encrypted based on whether SSL encryption is enabled on the destination database. DTS trusts the server certificate by default. Click Test Connectivity and Proceed. Add the DTS server IP address shown in the dialog box to the whitelist security settings of your Amazon RDS for SQL Server, then click Test Connectivity.
ImportantAdding DTS server IP address ranges to your allowlist may expose your database to security risks. Implement basic security measures: use strong account passwords, limit open ports per CIDR block, use authentication for internal API communication, and review and restrict unnecessary CIDR blocks regularly. For instructions, see Add DTS server IP addresses to the whitelist.
Configure migration objects and types.
On the Configure Objects page, set the following:
Field Description Migration Types Select the migration types to run: Schema Migration, Full Data Migration, and/or Incremental Data Migration. For full migration only, select Schema Migration and Full Data Migration. For near-zero-downtime migration, select all three. If you skip Schema Migration, create the target database and tables manually, or use object name mapping. If you skip Incremental Data Migration, do not write to the source during migration. Method to Migrate Triggers in Source Database Select Manual Migration unless your objects do not include triggers. Available only when both Schema Migration and Incremental Data Migration are selected. For details, see Configure trigger migration or synchronization. SQL Server Incremental Synchronization Mode Select Polling and querying CDC instances for incremental synchronization. Appears only when Incremental Data Migration is selected. The maximum number of tables for which CDC is enabled that DTS supports. Keep the default value. Processing Mode of Conflicting Tables Precheck and Report Errors: Fails the precheck if tables with the same names exist in the destination. Ignore Errors and Proceed: Skips the check. During full migration, existing destination records are kept; during incremental migration, source records overwrite destination records. If schemas differ, only some columns may be migrated or the migration may fail. Capitalization of Object Names in Destination Instance Configure case sensitivity for migrated object names. Default: DTS default policy. See Case sensitivity of object names in the destination database. Source Objects Click objects in the Source Objects box, then click the right arrow to move them to Selected Objects. You can select databases, tables, or columns. Selecting tables or columns excludes other objects (views, triggers, stored procedures). Selected Objects To rename a migration object in the destination, right-click it and edit the name. See Map database, table, and column names. To remove an object, click it, then click the remove icon. To filter rows, right-click a table and set a WHERE clause. See Set filter conditions. Object name mapping may cause migration failures for dependent objects. Click Next: Advanced Settings and configure the following:
Field Description Dedicated Cluster for Task Scheduling By default, DTS schedules tasks on a shared cluster. To run tasks on a dedicated cluster for better stability, purchase one separately. Retry Time for Failed Connections Default: 720 minutes. Range: 10–1440 minutes. Set to more than 30 minutes. If DTS reconnects within this period, the task resumes automatically; otherwise, it fails. Billed during the retry period—release the DTS instance promptly if the source or destination is released. Retry Time for Other Issues Default: 10 minutes. Range: 1–1440 minutes. Set to more than 10 minutes. Must be less than Retry Time for Failed Connections. Enable Throttling for Full Data Migration Set Queries per second (QPS) to the source database, RPS of Full Data Migration, and Data migration speed for full migration (MB/s). Available only when Full Data Migration is selected. You can also adjust the full migration speed after the task starts. Enable Throttling for Incremental Data Migration Set RPS of Incremental Data Migration and Data migration speed for incremental migration (MB/s). Available only when Incremental Data Migration is selected. You can also adjust the incremental migration speed after the task starts. Environment Tag (Optional) Select a tag to label this instance. Configure ETL Select Yes to enable extract, transform, and load (ETL) and enter data processing statements. Select No to skip. For details, see Configure ETL in a data migration or data synchronization task. Monitoring and Alerting Select Yes to configure an alert threshold and notifications. DTS sends an alert if a migration fails or latency exceeds the threshold. Click Next: Data Validation to configure data validation (optional). For instructions, see Configure data validation.
Save the task and run the precheck. Click Next: Save Task Settings and Precheck. To preview the API parameters for this configuration, hover over the button and click Preview OpenAPI parameters.
- DTS runs a precheck before the migration starts. The task starts only after the precheck passes. - If the precheck fails, click View Details next to the failed item, fix the issue, and run the precheck again. - If a warning appears: for items that cannot be ignored, fix the issue and rerun. For items that can be ignored, click Confirm Alert Details, Ignore, OK, and Precheck Again. Ignoring warnings may cause data inconsistency.
Purchase the instance. View migration progress on the Data Migration Tasks list page.
When the Success Rate reaches 100%, click Next: Purchase Instance.
On the Purchase page, select an instance class.
Section Field Description New Instance Class Resource Group Settings Select the resource group for this instance. Default: default resource group. See What is Resource Management? Instance Class Select a class based on your migration scenario. The class affects migration speed. See Data migration link specifications. Read and accept the Data Transmission Service (Pay-as-you-go) Service Terms.
Click Buy and Start, then click OK in the confirmation dialog.
- Full-only migration stops automatically after completion. The task Status changes to Completed. - Migration that includes incremental migration does not stop automatically. The task continues running with Status set to Running.
FAQ
Does the one-stop cloud migration feature of RDS support selecting objects for validation?
No. By default, the objects for validation are the same as the objects for migration.
What validation mode does the one-stop cloud migration feature use?
HASH validation with a 100% sampling rate.
What is the baseline for full validation in the one-stop cloud migration feature?
The union of the source and destination databases is used as the baseline to validate data consistency between them.