Help Center> Relational Database Service> User Guide> Working with RDS for SQL Server> Database Migration> Migrating Data to RDS for SQL Server Using the Export and Import Functions of DAS
Updated on 2023-09-26 GMT+08:00

Migrating Data to RDS for SQL Server Using the Export and Import Functions of DAS

Scenarios

To back up or migrate data, you can use Data Admin Service (DAS) to export data from the source database first and then import the data to from your local PC or OBS bucket to the destination database.

For more information, see Import and Export.

Constraints

  • Only one file that is no larger than 1 GB can be imported at a time.
  • Binary fields such as BINARY, VARBINARY, TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB are not supported.

Exporting Data

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  4. On the Instances page, locate the DB instance and click Log In in the Operation column.
  5. On the displayed login page, enter the username and password and click Log In.
  6. On the top menu bar, choose Import and Export > Export.
  7. On the displayed page, click Create Task and choose Export Database or Export SQL Result as required. The following takes database export as an example.

    Alternatively, click Quick Export to export the specified database information quickly.

    Figure 1 Creating an export task

  8. On the displayed page, set parameters as required in areas Basic Information and Advanced Settings. Then, select the tables to be exported on the right.

    Figure 2 Advanced settings

  9. After settings are complete, click OK.
  10. In the task list, view the task ID, type, status, and progress.

    Figure 3 Task list

  11. Click Details in the Operation column to view task details.

    Figure 4 Task details

Importing Data

  1. On the top menu bar, choose Import and Export > Import.
  2. Import a file from your local PC or an OBS bucket.

    Figure 5 Creating an import task
    • From your local PC

    In the upper left corner, click Create Task. On the displayed page, select an import type, select Upload file for File Source, set the attachment storage, and upload the file. Then, set other parameters as required.

    • To keep your data secure, provide your own OBS bucket to store the attachments you upload. In this way, DAS automatically connects to your OBS bucket for in-memory reading.
    • If you select Delete the uploaded file upon an import success, the file you uploaded will be automatically deleted from the OBS bucket after being imported to the destination database.
    • From an OBS bucket

      In the upper left corner, click Create Task. On the displayed page, select an import type, select Choose from OBS for File Source, and select a file from the bucket. Then, set other parameters as required.

    The file uploaded from an OBS bucket will not be deleted upon an import success.

  3. After setting the import parameters, click Create. Confirm the information again before you click OK because original data may be overwritten after data import.

    Figure 6 Confirmation page

  4. View the import progress in the task list or check task details.