ApsaraDB RDS instances that run SQL Server 2008 R2 allow you to easily migrate data to the cloud. You need to only use the backup feature of Microsoft to back up full data on your own database. Then, upload the backup files to an Object Storage Service (OSS) bucket to fully migrate the data to the specified database of your ApsaraDB RDS for SQL Server instance by using the ApsaraDB RDS console. The backup feature of Microsoft is compatible with ApsaraDB RDS for SQL Server.
Prerequisites
- A destination database that has the same name as the self-managed database is created on your RDS instance. For more information, see Create an account and a database for an ApsaraDB RDS instance that runs SQL Server 2008 R2.
- If you use a RAM user, make sure that the following requirements are met:
- The AliyunOSSFullAccess and AliyunRDSFullAccess policies are attached to the RAM user. For more information about how to grant permissions to RAM users, see Use RAM to manage OSS permissions and Use RAM to manage ApsaraDB RDS permissions.
- The service account of ApsaraDB RDS is authorized by using your Alibaba Cloud account to access the OSS bucket.
- A custom policy is manually created by using your Alibaba Cloud account and is attached to the RAM user. For more information about how to create a custom policy, see Create a custom policy on the JSON tab. You must use the following content for the custom policy:
{ "Version": "1", "Statement": [ { "Action": [ "ram:GetRole" ], "Resource": "acs:ram:*:*:role/AliyunRDSImportRole", "Effect": "Allow" } ] }
Usage notes
The migration method that is described in this topic is at the database level. You can migrate the full backup data only of a single self-managed database to your RDS instance at a time. If you want to migrate the full backup data of multiple or all databases in a self-managed instance at a time, we recommend that you use an instance-level migration method. For more information, see Migrate data from a self-managed SQL Server instance to an ApsaraDB RDS for SQL Server instance.
Billing
If you use the method described in this topic to migrate data, you are charged only for the use of OSS buckets.

Scenario | Fee |
---|---|
Upload backup files to an OSS bucket | Free of charge. |
Store backup files in an OSS bucket | You are charged storage fees. For more information, visit the Pricing page of OSS. |
Migrate backup files from an OSS bucket to your RDS instance |
|
Procedure
- Back up the self-managed database.
- Upload the backup file of your self-managed database to an OSS bucket.
- For more information about how to upload a file that is smaller than 5 GB in size, see Upload an object.
- For more information about how to upload multiple files or a file that is larger than 5 GB in size, see Multipart upload and resumable upload. For more information about how to use the graphical management tool ossbrowser, see ossbrowser.
Important Your RDS instance and OSS bucket can communicate over an internal network only when they reside in the same region. Therefore, you must upload the backup file to the OSS bucket that resides in the same region as your RDS instance. - Set the validity period and obtain the URL of the backup file.
- Restore data to your RDS instance by using the backup file in the OSS bucket.
Related operations
Operation | Description |
---|---|
Create a migration task | Creates a migration task |
Open the database to which backup data is migrated | Opens a database. |
Query backup data migration tasks | Queries the migration tasks. |
Query the backup file details of a backup data migration task | Queries the details about the backup files that are uploaded to an OSS bucket. |