Reverse migrate a database from Hyperscale
You can migrate an existing Hyperscale database in Azure SQL Database to the General Purpose service tier using the Azure portal, the Azure CLI, PowerShell, or Transact-SQL.
Reverse migration to the General Purpose service tier allows customers who have recently converted an existing database in Azure SQL Database to Hyperscale to move back in an emergency, should Hyperscale not meet their needs. While reverse migration is initiated by a service tier change, it's essentially a size-of-data move between different architectures.
Limitations for reverse migration
Reverse migration is available under the following conditions:
- Reverse migration is only available within 45 days of the original migration to Hyperscale.
- Databases originally created in the Hyperscale service tier aren't eligible for reverse migration.
- You might reverse migrate to the General Purpose service tier only. Your migration from Hyperscale to General Purpose can target either the serverless or provisioned compute tiers. If you wish to migrate the database to another service tier, such as Business Critical or a DTU based service tier, first reverse migrate to the General Purpose service tier, then change the service tier.
- Reverse migration to databases with less than 2 vCores is not supported. You can scale the database down to fewer than 2 vCores once the migration is complete.
- Direct reverse migration from, or to, an elastic pool isn't supported. You can reverse migrate only a Hyperscale single database to a General Purpose single database.
- If the Hyperscale database is part of a Hyperscale elastic pool, you have to first remove it from the Hyperscale elastic pool prior to reverse migration.
- After reverse migration is complete, you can then optionally add the General Purpose single database to a General Purpose elastic pool if needed.
- For databases that don't qualify for reverse migration, the only way to migrate from Hyperscale to a non-Hyperscale service tier is to export/import using a bacpac file or other data movement technologies (Bulk Copy, Azure Data Factory, Azure Databricks, SSIS, etc.) Bacpac export/import from Azure portal, from PowerShell using New-AzSqlDatabaseExport or New-AzSqlDatabaseImport, from Azure CLI using az sql db export and az sql db import, and from REST API isn't supported. Bacpac import/export for smaller Hyperscale databases (up to 150 GB) is supported using SSMS and SqlPackage version 18.4 and later. For larger databases, bacpac export/import might take a long time, and can fail for various reasons.
Duration and downtime
Unlike regular service level objective change operations in Hyperscale, migrating to Hyperscale and reverse migration to General Purpose are size-of-data operations.
The duration of a reverse migration operation depends mainly on the size of the database and concurrent write activities happening during the migration. The number of vCores you assign to the target General Purpose database also impacts the duration of the reverse migration. We recommend that you provision the target General Purpose database with a number of vCores greater than or equal to the number of vCores assigned to the source Hyperscale database to sustain similar workloads.
During reverse migration, the source Hyperscale database can experience performance degradation if under substantial load. Specifically, transaction log rate might be reduced (throttled) to ensure that reverse migration is making progress.
You'll experience a short period of downtime, generally a few minutes, during the final cutover to the new target General Purpose database.
Prerequisites
Before you initiate a reverse migration from Hyperscale to the General Purpose service tier, you must ensure that your database meets the limitations for reverse migration and:
- Your database doesn't have Geo Replication enabled.
- Your database doesn't have named replicas.
- Your database (allocated size) is small enough to fit into the target service tier.
- If you specify max database size for the target General Purpose database, ensure the allocated size of the database is small enough to fit into that maximum size.
Prerequisite checks occur before a reverse migration operation starts. If prerequisites aren't met, the reverse migration operation fails immediately.
Backup policies
You are billed using the regular pricing for all existing database backups within the configured retention period. You are billed for the Hyperscale backup storage snapshots and for size-of-data storage blobs that must be retained to be able to restore the backup.
You can convert a database to Hyperscale and reverse migrate back to General Purpose multiple times. Only backups from the current and once-previous tier of your database are available for restore. If you have moved from the General Purpose service tier to Hyperscale and back to General Purpose, the only backups available are the ones from the current General Purpose database and the immediately previous Hyperscale database. These retained backups are billed as per Azure SQL Database billing. Any previous tiers tried won't have backups available and will not be billed.
For example, you could migrate between Hyperscale and non-Hyperscale service tiers:
- General Purpose
- Convert to Hyperscale
- Reverse migrate to General Purpose
- Service tier change to Business Critical
- Convert to Hyperscale
- Reverse migrate to General Purpose
In this case, the only backups available would be from steps 5 and 6 of the timeline, if they are still within the configured retention period. Any backups from previous steps would be unavailable. Carefully consider the availability of backups when attempting repeated migrations of the same database between the Hyperscale and the General Purpose service tiers. Backups of databases older than the immediately previous database become unavailable as soon as a reverse migration is started and remain unavailable even if the migration is canceled.
How to reverse migrate a Hyperscale database to the General Purpose service tier
To reverse migrate an existing Hyperscale database in Azure SQL Database to the General Purpose service tier, first identify your target service objective in the General Purpose service tier and whether you wish to migrate to the provisioned or serverless compute tiers. Review resource limits for single databases if you aren't sure which service objective is right for your database.
If you wish to perform an additional service tier change after reverse migrating to General Purpose, identify your eventual target service objective. Ensure that your database's allocated size is small enough to fit in that service objective.
Select the tab for your preferred method to reverse migrate your database:
The Azure portal enables you to reverse migrate to the General Purpose service tier by modifying the pricing tier for your database.
- Navigate to the database in the Azure portal.
- In the left navigation bar, select Compute + storage.
- Select the Service tier dropdown list to expand the options for service tiers.
- Select General Purpose (Scalable compute and storage options) from the dropdown list menu.
- Review the Hardware Configuration listed. If desired, select Change configuration to select the appropriate hardware configuration for your workload.
- Select the vCores slider if you wish to change the number of vCores available for your database under the General Purpose service tier.
- Select Apply.
- Monitor the conversion in the Azure portal.
- Navigate to the database in the Azure portal.
- In the left navigation bar, select Overview.
- Review the Notifications section at the bottom of the right pane. If operations are ongoing, a notification box appears.
- To view details, select the notification box.
- The Ongoing operations pane opens. Review the details of the ongoing operations.