This topic describes how to use Data Transmission Service (DTS) to migrate data between ApsaraDB RDS for SQL Server instances. DTS supports schema migration, full data migration, and incremental data migration. When you configure a data migration task, you can select all of the supported migration methods to ensure business continuity.
Prerequisites
- A source RDS instance and a destination RDS instance are created. For more information,
see Create an ApsaraDB RDS for SQL Server instance.
Note
- For compatibility purposes, we recommend that the database engine version of the destination RDS instance be the same as or later than the database engine version of the source RDS instance.
- If the database engine version of the destination RDS instance is earlier than the database engine version of the source RDS instance, database compatibility issues may occur.
- The storage capacity of the destination RDS instance is larger than the storage that is occupied by the source RDS instance.
Usage notes
- The data migration does not affect the data of the source RDS instance. During data migration, DTS reads the data of the source RDS instance and replicates the data to the destination RDS instance. DTS does not delete the data of the source RDS instance. For more information, see How DTS works in data migration mode.
- DTS uses read and write resources of the source and destination databases during full data migration. This may increase the loads of the database servers. If the database performance is unfavorable, the specification is low, or the data volume is large, database services may become unavailable. For example, DTS occupies a large amount of read and write resources in the following cases: a large number of slow SQL queries are performed on the source database, the tables have no primary keys, or a deadlock occurs in the destination database. Before you migrate data, evaluate the impact of data migration on the performance of the source and destination databases. We recommend that you migrate data during off-peak hours. For example, you can migrate data when the CPU utilization of the source and destination databases is less than 30%.
- The tables to be migrated in the source database must have PRIMARY KEY or UNIQUE constraints and all fields must be unique. Otherwise, the destination database may contain duplicate data records.
- To ensure data consistency, we recommend that you do not write data to the source RDS instance during full data migration.
- If a data migration task fails, DTS automatically resumes the task. Before you switch your workloads over to the destination RDS instance, you must stop or release the data migration task. Otherwise, the data of the source RDS instance overwrites the data of the destination RDS instance if the data migration task is running or resumed.
- DTS automatically creates databases on the destination RDS instance. If the name of
a database that you want to replicate from the source RDS instance is invalid, you
must log on to the destination RDS instance and create a database for the database
that you want to replicate before you configure the migration task.
Note For more information about how to create a database and the database naming conventions, see Create accounts and databases for an ApsaraDB RDS instance that runs SQL Server 2017 EE.
Billing
Migration type | Task configuration fee | Internet traffic fee |
---|---|---|
Schema migration and full data migration | Free of charge. | Charged only when data is migrated from Alibaba Cloud over the Internet. For more information, see Billing overview. |
Incremental data migration | Charged. For more information, see Billing overview. |
Migration types
- Schema migration
DTS migrates the schemas of the specified objects from the source ApsaraDB RDS instance to the destination ApsaraDB RDS instance.
- Full data migration
DTS migrates all historical data of the specified objects from the source ApsaraDB RDS instance to the destination ApsaraDB RDS instance.
- Incremental data migration
After full data migration is complete, DTS synchronizes incremental data from the source ApsaraDB RDS instance to the destination ApsaraDB RDS instance. Incremental data migration allows you to ensure service continuity when you migrate data between ApsaraDB RDS instances.
SQL operations that can be synchronized during incremental data migration
Operation type | SQL statement |
---|---|
DML | INSERT, UPDATE, and DELETE
Note If an UPDATE operation updates only large fields, DTS does not synchronize the operation.
|
DDL |
|
Permissions required for database accounts
Instance | Schema migration | Full data migration | Incremental data migration |
---|---|---|---|
Source RDS instance | SELECT permission | SELECT permission | Owner permissions on the objects to be migrated
Note A privileged account has the required permissions.
|
Destination RDS instance | Read and write permissions | Read and write permissions | Read and write permissions |
For more information about how to create a database account and grant permissions to the account, see Create an account for an RDS SQL Server instancy and Create a database on an ApsaraDB RDS for SQL Server instance.