Active geo-replication for Azure SQL is a business continuity solution that lets you perform quick disaster recovery of individual databases if there is a regional disaster or a large-scale outage. Up to four geo-secondaries could be created for an Azure SQL database except for Hyperscale, until now.
We’re excited to announce that Azure SQL Database Hyperscale support for up to four geo-replicas is available now in public preview. This enhancement gives you greater flexibility for disaster recovery, regional scale-out, and migration scenarios.
What’s New?
- Create up to four read-only geo-replicas for each Hyperscale database, in the same or different Azure regions.
- Use the additional geo-replicas to add read scale-out capabilities to additional regions.
- More flexibility to facilitate database migrations and zone redundancy changes.
How to Get Started
Getting started with multiple geo-replicas in Azure SQL Hyperscale is straightforward.
In the Azure Portal, you can add multiple geo-replicas using the same process that you currently use to add a geo-replica.
- Go to your Hyperscale database in the Azure portal.
- Open the “Replicas” blade under “Data management”.
Create a replica from the portal - Click “Create replica”.
TIP: If you want the geo-replica enabled for zone redundancy, remember to click on "Configure database" in the "Compute + storage" section during this step. The zone redundancy setting is not automatically inherited from the primary database when creating the geo-replica. - Select the target server
- Review and create
Creating a geo-replica can also be done with command line tools like PowerShell.
Example:
-DatabaseName mydb1
-ServerName sqlserver1
-ResourceGroupName myrg
-PartnerResourceGroupName myrg
-PartnerServerName sqlserver2
-AllowConnections “All”
Performing a Failover
Performing a failover in the portal is the same process with multiple geo-replicas. Click on the ellipses in the row of the replica to which you want to fail over and choose Failover or Forced failover.
Perform a failover in the portal
For PowerShell, use the Set-AzSqlDatabaseSecondary cmdlet.
Example:
-DatabaseName mydb1
-PartnerResourceGroupName myrg
-ServerName sqlserver2
-ResourceGroupName myrg
-Failover
Limitations & Notes
- You can create up to four geo-replicas per database.
- Geo-replicas must be created on different logical servers.
- Chaining (creating a geo-replica of a geo-replica) is not supported.
- If you would like zone redundancy enabled for the geo-replica, you must configure that setting during the create geo-replica process since the setting is not automatically inherited from the primary database.
Learn More:
- Hyperscale secondary replicas - Azure SQL Database | Microsoft Learn
- Active Geo-Replication - Azure SQL Database | Microsoft Learn