All Products
Search
Document Center

ApsaraDB RDS:Recover SQL Server data using a temporary instance

Last Updated:Mar 01, 2026

If an operational error causes data loss on your ApsaraDB RDS for SQL Server instance, you can create a temporary instance from a backup to verify your recovered data. After verification, migrate the data back to your primary instance by using Data Transmission Service (DTS). The temporary instance runs in an isolated environment, so your primary instance is not affected during recovery.

Note

For help choosing the right recovery method, see Overview of restoration methods.

When to use this method

Use a temporary instance when you need to verify recovered data before applying it to production. This approach adds a verification step compared to restoring directly to the original instance, which helps prevent applying incorrect or incomplete data.

Typical scenarios:

  • Accidental deletion of records or tables that requires selective recovery

  • Data corruption that requires inspecting the restored state before committing changes

  • Recovery validation for compliance or audit purposes

Prerequisites

Before you begin, make sure that you have:

  • An ApsaraDB RDS for SQL Server 2008 R2 high-availability series instance with Premium Local SSDs (other editions and storage classes are not supported)

  • A data backup of the instance. For point-in-time restore, log backups are also required. For details, see Configure automatic backups or create a manual backup.

Usage notes

ItemDetails
Account and passwordThe temporary instance inherits the database account and password from the backup file.
Network typeClassic network.
Instance limitOnly one temporary instance can exist at a time. Delete the existing one before creating a new one.
Database and account changesYou cannot add, modify, or delete databases or accounts on a temporary instance.
Public endpointYou cannot apply for a public endpoint for a temporary instance. If you must use a public endpoint for a temporary instance, submit a ticket.

Billing

ResourceCost
Standard temporary instanceFree. Automatically released 2 days after creation.
Higher-version temporary instanceFree. Automatically released 7 days after creation.
DTS migration taskCharged based on link specification. See Data migration link specifications.

Step 1: Create a temporary instance

  1. Go to the Instances page. In the top navigation bar, select the region of your RDS instance, and then click the instance ID.

  2. In the left-side navigation pane, choose Backup and Restoration.

  3. Click the Temporary Instance tab.

  4. Select a restore point. The instance is restored from the last backup created before the selected point in time.

    • Select Time: The time points displayed on the page are the creation times of the valid backup sets on the Data Backup tab.

    • Other Times: Select a point in time from other valid backup sets.

  5. Select a creation type for the temporary instance:

    • Create Temporary Instance: Creates a standard temporary instance. Click the button, and then click OK.

    • Create Temporary Instance of Higher Version: Creates a temporary instance on a newer SQL Server version. Select a zone, a target upgrade version, a VPC, and a vSwitch, and then click OK.

    Note

    For a higher-version temporary instance, the instance type and storage class use default configurations and cannot be modified.

  6. Wait for the temporary instance to be created. The time depends on your data volume. To check progress, go to the Tasks page.

Step 2: Migrate data back to the primary instance

After the temporary instance is created, use DTS to migrate the verified data back to your primary instance.

  1. Return to the RDS Instances page and click the primary instance ID.

  2. At the top of the page, click Database Migration to open the DTS Data Migration Tasks page.

  3. In the upper-left corner, select the region of the migration instance.

  4. Click Create Task and configure the source and destination databases. Set the Task Name to a descriptive name for easy identification.

    Warning

    After you select the source and destination instances, carefully read the limits displayed at the top of the page. Ignoring them may cause task failures or data inconsistency.

    Source database information

    ParameterValue
    Database TypeSelect SQL Server.
    Connection TypeSelect Self-managed Database with Public IP. If you select a self-managed database, complete the required preparations first. For details, see Overview of preparations.
    Instance RegionSelect the region of the source self-managed SQL Server database.
    Hostname or IP AddressEnter the endpoint of the source database. In this example, enter the public endpoint.
    PortEnter the service port. The default port is 1433.
    Database AccountEnter the database account.
    Database PasswordEnter the password.

    Destination database information

    ParameterValue
    Database TypeSelect SQL Server.
    Connection TypeSelect Alibaba Cloud Instance.
    Instance RegionSelect the region of your destination ApsaraDB RDS for SQL Server instance.
    Instance IDSelect the instance ID.
    Database AccountEnter the database account.
    Database PasswordEnter the password.
  5. Click Test Connectivity and Proceed. DTS automatically adds its CIDR blocks to the IP address whitelist of Alibaba Cloud database instances and to the security group rules of Elastic Compute Service (ECS) instances that host self-managed databases. For self-managed databases in on-premises data centers or from third-party cloud providers, manually add the CIDR blocks. For details, see CIDR blocks of DTS servers.

    Warning

    Automatically or manually adding the public CIDR blocks of DTS servers may pose security risks. Implement basic security measures such as using strong passwords, limiting open ports, using authentication for internal API calls, and regularly reviewing whitelist entries. As an alternative, connect through an internal network such as a leased line, VPN Gateway, or Smart Access Gateway.

  6. Configure the task objects and advanced settings. For details, see Step 5.

  7. Click Next: Save Task Settings and Precheck.

    Hover over the Next: Save Task Settings and Precheck button and click Preview OpenAPI parameters to view the API parameters for this configuration.
    The task starts only after the precheck passes. - If the precheck fails, click View Details next to the failed item, fix the issue, and run the precheck again. - If a warning is reported: for items that cannot be ignored, fix the issue and rerun the precheck. For items that can be ignored, click Confirm Alert Details, Ignore, OK, and Precheck Again to skip the warning. Ignoring a warning may cause data inconsistency.
  8. When the Success Rate reaches 100%, click Next: Purchase Instance.

  9. Select the link specification for the DTS migration instance:

    ParameterDescription
    Resource Group SettingsSelect the resource group. The default value is the default resource group. For details, see What is Resource Management?
    Instance ClassSelect a specification based on your migration speed requirements. For details, see Data migration link specifications.
  10. Read and select Data Transmission Service (Pay-as-you-go) Service Terms.

  11. Click Buy and Start, and then click OK in the confirmation dialog box.

Step 3: Verify the migration and clean up

  1. Monitor the migration progress on the Data Migration Tasks page.

    • If the task does not include incremental migration, it stops automatically after completion. The Status changes to Completed.

    • If the task includes incremental migration, it continues running. The Status remains Running until you manually stop it.

  2. (Optional) After data validation or migration is complete, delete the temporary instance:

    1. Go to the details page of your primary instance. In the left-side navigation pane, click Backup and Restoration.

    2. Click the Temporary Instance tab, and then click Delete Temporary Instance.

References

  • To create a temporary instance by calling an API operation, see CreateTempDBInstance.

  • To connect to a temporary instance, use DMS or SQL Server Management Studio (SSMS) on an ECS instance over the internal network. For details, see Log on to a temporary instance.