All Products
Search
Document Center

ApsaraDB RDS:ImportDatabaseBetweenInstances

Last Updated:Mar 13, 2024

Migrates data across ApsaraDB RDS for SQL Server instances.

Operation description

Supported database engine

  • SQL Server

Description

We recommend that you use Data Transmission Service (DTS). DTS provides data migration, subscription, and synchronization features that allow you to establish stable, secure transmission links. For more information, see DTS API overview.

Precautions

  • During the migration, the source instance is in the Migrating state, and the destination instance is in the Importing state.

  • Before you call this operation, make sure that the following conditions are met:

    • The source and destination instances must run SQL Server and belong to the dedicated or dedicated host instance family. For more information about the supported instance types, see Primary instance types.
    • The source and destination instances must be created by using the same user.
    • The instance is in the Running state.
    • The source and destination databases must be in the Running state.
    • The remaining storage of the destination instance must be greater than the storage capacity of the source instance.
Note
  • This operation is not supported for instances that run SQL Server 2017 on RDS Cluster Edition.
  • You can migrate the data of multiple databases at a time.
  • Debugging

    OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

    Authorization information

    There is currently no authorization information disclosed in the API.

    Request parameters

    ParameterTypeRequiredDescriptionExample
    DBInstanceIdstringYes

    The ID of the instance.

    rm-uf6wjk5xxxxxxx
    SourceDBInstanceIdstringYes

    The ID of the source instance, which cannot be the same as the ID of the destination instance.

    rm-g4a1jk8xxxxxxx
    DBInfostringYes

    The names of the source and destination databases. The value of this parameter is a JSON string.

    Note If the source instance runs SQL Server, the value of this parameter consists of one or more key-value pairs. In each key-value pair, the key specifies the name of the source database, and the value specifies the name of the destination database. A source database can have a different name from the destination database. For example, {"DBNames":{"srcdb":"destdb","srcdb2":"destmydb2"}} indicates that srcdb is migrated to destdb and srcdb2 is migrated to destmydb2. The names of source databases cannot be the same, and the names of destination databases cannot be the same.
    {"DBNames":["mydb","mydb2"]}

    Response parameters

    ParameterTypeDescriptionExample
    object

    The response parameters.

    ImportIdstring

    The ID of the import task.

    852654*****
    RequestIdstring

    The ID of the request.

    5A77D650-27A1-4E08-AD9E-59008EDB6927

    Examples

    Sample success responses

    JSONformat

    {
      "ImportId": "852654*****",
      "RequestId": "5A77D650-27A1-4E08-AD9E-59008EDB6927"
    }

    Error codes

    For a list of error codes, visit the Service error codes.

    Change history

    Change timeSummary of changesOperation
    2022-06-23API Description Updatesee changesets
    Change itemChange content
    API DescriptionAPI Description Update.