All Products
Search
Document Center

Data Transmission Service:Migrate data between ApsaraDB RDS instances of different Alibaba Cloud accounts

Last Updated:Apr 02, 2026

Data Transmission Service (DTS) lets you migrate data between ApsaraDB RDS instances that belong to different Alibaba Cloud accounts. This is useful for scenarios such as account consolidation, organizational restructuring, and multi-account management.

In this topic, you will:

  • Set up RAM authorization so DTS can access the source account's resources

  • Create and configure a cross-account data migration task

  • Run a precheck and purchase a migration instance to start the migration

Prerequisites

Before you begin, make sure you have:

  • The Alibaba Cloud account IDs for both the source and destination RDS instances. See Preparations below for how to get these IDs.

  • Configured RAM authorization for DTS to access the source account's resources — including creating a RAM role, granting the required permissions, and modifying the trust policy. See Preparations below.

  • A destination ApsaraDB RDS instance with available storage space larger than the total size of the data in the source database.

For the database versions supported as sources and destinations, see Overview of data migration scenarios.

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. See Billing overview.
Incremental data migration Charged. See Billing overview. Charged only when data is migrated from Alibaba Cloud over the Internet.

Database account permissions

The database accounts used for migration must have the permissions listed below. Permissions vary by database engine and migration type.

ApsaraDB RDS for MySQL

Database Schema migration Full data migration Incremental data migration
Source instance SELECT SELECT Read and write
Destination instance Read and write Read and write Read and write

To create an account and grant permissions, see Create an account on an ApsaraDB RDS for MySQL instance and Modify the permissions of a standard account on an ApsaraDB RDS for MySQL instance.

If the source database account was not created in the ApsaraDB RDS for MySQL console, it must have the REPLICATION CLIENT, REPLICATION SLAVE, SHOW VIEW, and SELECT permissions.
To migrate account information, additional permissions are required. See Migrate database accounts.

ApsaraDB RDS for MariaDB

Database Schema migration Full data migration Incremental data migration
Source instance SELECT SELECT Read and write
Destination instance Read and write Read and write Read and write

To create an account and grant permissions, see Create an account and Modify or reset account permissions.

ApsaraDB RDS for PostgreSQL

Database Schema migration Full data migration Incremental data migration
Source instance USAGE permission on the pg_catalog schema SELECT permission on the objects to be migrated Privileged account that owns the database
Destination instance CREATE and USAGE permissions on the objects to be migrated Permissions of the schema owner
If the source instance runs PostgreSQL 9.4 and you want to migrate only DML operations, only the REPLICATION permission is required.

To create an account and grant permissions, see Create an account and Create a database.

ApsaraDB RDS for SQL Server

Database Schema migration Full data migration Incremental data migration
Source instance SELECT SELECT Permissions of the object owner
Destination instance Access control list Access control list Access control list

To create an account and grant permissions, see Create a privileged account or a standard account and Modify the permissions of an account.

Database-specific considerations

For database-specific usage notes, see:

Procedure

Create a cross-account migration task

The following steps use ApsaraDB RDS for MySQL as an example.

From the DTS console

  1. Log on to the Data Transmission Service (DTS) console.

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

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

From the DMS console

Note

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

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

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

  3. To the right of Data Migration Tasks, select the region where the migration instance is located.

Configure source and destination databases

  1. Click Create Task.

  2. Configure the source and destination databases. The cross-account parameters are described below.

    • Do not enter AliyunDTSDefaultRole as the RAM role name.

    • Do not enter the Alibaba Cloud Resource Name (ARN) of the RAM role.

    Source database parameters

    Parameter Description
    Task Name Enter a name that helps you identify this task. DTS generates a default name; you do not need to use a unique name.
    Select Existing Connection Optional. Select an existing registered instance to auto-fill the database parameters, or leave blank to configure manually.
    Database Type Select MySQL.
    Access Method Select Alibaba Cloud Instance.
    Instance Region Select the region where the source ApsaraDB RDS instance resides. Source and destination instances can be in different regions.
    Replicate Data Across Alibaba Cloud Accounts Select Yes.
    Alibaba Cloud Account Enter the ID of the Alibaba Cloud account that owns the source instance. See the Obtain the ID of the Alibaba Cloud account to which the source database belongs section in "Configure RAM authorization for cross-account DTS tasks".
    RAM Role Name Enter the RAM role name configured for the source account — for example, ram-for-dts. See the Step 1: Create a RAM role section in "Configure RAM authorization for cross-account DTS tasks".
    RDS Instance ID Select the source ApsaraDB RDS instance ID. If an alert appears, resolve it as described in the Common errors section.
    Database Account Enter the source database account. See Database account permissions.
    Database Password Enter the password for the database account.
    Encryption Select Non-encrypted or SSL-encrypted. To use SSL encryption, enable it on the RDS instance first. See Configure the SSL encryption feature.

    Destination database parameters

    Parameter Description
    Select Existing Connection Optional. Select an existing registered instance to auto-fill the database parameters, or leave blank to configure manually.
    Database Type Select MySQL.
    Access Method Select Alibaba Cloud Instance.
    Instance Region Select the region where the destination ApsaraDB RDS instance resides.
    Replicate Data Across Alibaba Cloud Accounts Select No. The destination instance belongs to the account you are logged in with.
    RDS Instance ID Select the destination ApsaraDB RDS instance ID.
    Database Account Enter the destination database account. See Database account permissions.
    Database Password Enter the password for the database account.
    Encryption Select Non-encrypted or SSL-encrypted. To use SSL encryption, enable it on the RDS instance first. See Configure SSL encryption for an ApsaraDB RDS for MySQL instance.
  3. Click Test Connectivity and Proceed.

    Make sure the CIDR blocks of DTS servers are added to the security settings of the source and destination databases. See Add the CIDR blocks of DTS servers.

Configure objects to migrate

  1. On the Configure Objects page, configure the migration options.

    Parameter Description
    Migration Types Select the migration types based on your requirements:
    • Full migration only: Select Schema Migration and Full Data Migration. We recommend that you do not write data to the source database during migration to ensure data consistency.
    • Migration with minimal downtime: Select Schema Migration, Full Data Migration, and Incremental Data Migration.
    Note

    If you skip Schema Migration, make sure a database and a table are created in the destination database to receive data, and that the object name mapping feature is enabled in Selected Objects.

    Method to Migrate Triggers in Source Database Available only when both Schema Migration and Incremental Data Migration are selected. See Synchronize or migrate triggers from the source database.
    Enable Migration Assessment Available only when Schema Migration is selected. Checks index lengths, stored procedures, and dependent tables. Assessment results are informational and do not affect the precheck.
    Processing Mode of Conflicting Tables Choose how to handle tables with identical names in the source and destination databases:
    • Precheck and Report Errors: The task fails the precheck if duplicate table names are found. If the tables in the destination database cannot be deleted or renamed, you can use object name mapping to rename the tables migrated to the destination database.
    • Ignore Errors and Proceed: Skips the precheck for duplicate table names.
      Warning

      This may cause data inconsistency. During full migration, records with the same primary key are not migrated and the existing destination record is kept. During incremental migration, the destination record is overwritten.

    Whether to migrate Event Select whether to migrate events. See Synchronize or migrate events.
    Capitalization of Object Names in Destination Instance Controls the capitalization of database, table, and column names in the destination. Default is DTS default policy. See Specify the capitalization of object names in the destination instance.
    Source Objects Select the objects to migrate, then click the right-arrow icon to add them to Selected Objects. You can select columns, tables, or databases. If you select tables or columns, views, triggers, and stored procedures are not migrated.
    Selected Objects Right-click an object to rename it in the destination, filter data with WHERE conditions, or select SQL operations for incremental migration. Click the remove icon to deselect objects.
  2. Click Next: Advanced Settings.

    Parameter Description
    Dedicated Cluster for Task Scheduling By default, DTS uses the shared cluster. For higher stability, purchase a dedicated cluster. See What is a DTS dedicated cluster.
    Copy the temporary table of the Online DDL tool that is generated in the source table to the destination database. Applies when using DMS or gh-ost for online DDL.
    Important

    Do not use pt-online-schema-change for online DDL on the source database — it causes the DTS task to fail. Options: Yes migrates temporary tables (may increase latency), No, Adapt to DMS Online DDL skips them and may lock destination tables, No, Adapt to gh-ost skips them and may lock destination tables.

    Whether to Migrate Accounts Select whether to migrate database accounts. In this example, No is selected.
    Retry Time for Failed Connections How long DTS retries after a connection failure. Valid values: 10–1,440 minutes. Default: 720. Set to at least 30 minutes. If DTS reconnects within this window, migration resumes; otherwise, the task fails.
    Retry Time for Other Issues How long DTS retries after DDL or DML failures. Valid values: 1–1,440 minutes. Default: 10. Set to at least 10 minutes. This value must be less than Retry Time for Failed Connections.
    Enable Throttling for Full Data Migration Limits read/write load on source and destination during full migration. Available only when Full Data Migration is selected. Configure Queries per second (QPS) to the source database, RPS of Full Data Migration, and Data migration speed for full migration (MB/s).
    Enable Throttling for Incremental Data Migration Limits load during incremental migration. Available only when Incremental Data Migration is selected. Configure RPS of Incremental Data Migration and Data migration speed for incremental migration (MB/s).
    Whether to delete SQL operations on heartbeat tables of forward and reverse tasks Controls whether heartbeat SQL operations are written to the source database. Yes does not write them (a latency value may appear for the instance). No writes them (may affect physical backup and cloning).
    Environment Tag An optional tag to identify the DTS instance.
    Configure ETL Enables the extract, transform, and load (ETL) feature. See What is ETL? and Configure ETL in a data migration or data synchronization task.
    Monitoring and Alerting Configures alerts when the task fails or migration latency exceeds the threshold. See Configure monitoring and alerting.
  3. Click Next Step: Data Verification to configure a data verification task. See Configure a data verification task.

Run a precheck and purchase an instance

  1. Click Next: Save Task Settings and Precheck. To preview the API parameters for this task, move the pointer over Next: Save Task Settings and Precheck and click Preview OpenAPI parameters before proceeding.

    • The precheck must pass before the migration task can start.

    • If the precheck fails, click View Details next to the failed item, resolve the issue, then click Precheck Again.

    • If a precheck item shows an alert: fix items that cannot be ignored; for ignorable items, click Confirm Alert Details, then Ignore, then OK, then Precheck Again. Ignoring alert items may cause data inconsistency.

  2. After Success Rate reaches 100%, click Next: Purchase Instance.

  3. On the Purchase Instance page, configure the following:

    Parameter Description
    Resource Group The resource group for the migration instance. Default: default resource group. See What is Resource Management?
    Instance Class Select an instance class based on your required migration speed. See Instance classes of data migration instances.
  4. Read and accept the Data Transmission Service (Pay-as-you-go) Service Terms, then click Buy and Start. In the confirmation dialog, click OK.

You can monitor the migration progress on the Data Migration page.

What's next

After the migration completes, verify data consistency between the source and destination databases before switching your application to use the destination instance.