title | description | author | ms.author | ms.reviewer | ms.date | ms.service | ms.subservice | ms.topic |
---|---|---|---|---|---|---|---|---|
Create a zone-redundant Hyperscale database |
Learn how to create a zone-redundant Hyperscale database. |
dimitri-furman |
dfurman |
wiassaf, mathoma |
10/12/2023 |
sql-database |
service-overview |
conceptual |
[!INCLUDEappliesto-sqldb]
This article teaches you to create a zone-redundant Hyperscale database by creating a new database, creating a geo-replica, or using database copy.
Use Azure PowerShell or the Azure CLI to create a zone redundant Hyperscale database. Confirm you have the latest version of the API to ensure support for any recent changes.
Specify the -ZoneRedundant
parameter to enable zone redundancy for your Hyperscale database by using Azure PowerShell. The database must have at least 1 high availability replica and zone-redundant backup storage must be specified.
To enable zone redundancy using Azure PowerShell, use the following example command:
New-AzSqlDatabase -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database01" `
-Edition "Hyperscale" -HighAvailabilityReplicaCount 1 -ZoneRedundant -BackupStorageRedundancy Zone -RequestedServiceObjectiveName HS_Gen5_2'
Specify the -zone-redundant parameter
to enable zone redundancy for your Hyperscale database by using the Azure CLI. The database copy must have at least 1 high availability replica and zone-redundant backup storage.
To enable zone redundancy using the Azure CLI, use the following example command:
az sql db create -g mygroup -s myserver -n mydb -e Hyperscale -f Gen5 –-ha-replicas 1 –-zone-redundant -–backup-storage-redundancy Zone --capacity 2
To make an existing Hyperscale database zone redundant, use Azure PowerShell or the Azure CLI to create a zone redundant Hyperscale database using active geo-replication. The geo-replica can be in the same or different region as the existing Hyperscale database.
Specify the -ZoneRedundant
parameter to enable zone redundancy for your Hyperscale database secondary. The secondary database must have at least 1 high availability replica and zone-redundant backup storage must be specified.
To create your zone redundant database using Azure PowerShell, use the following example command:
New-AzSqlDatabaseSecondary -ResourceGroupName "myResourceGroup" -ServerName $sourceserver -DatabaseName "databaseName" -PartnerResourceGroupName "myPartnerResourceGroup" -PartnerServerName $targetserver -PartnerDatabaseName "zoneRedundantCopyOfMySampleDatabase" -ZoneRedundant -BackupStorageRedundancy Zone -HighAvailabilityReplicaCount 1
Specify the -zone-redundant parameter
to enable zone redundancy for your Hyperscale database secondary. The secondary database must have at least 1 high availability replica and zone-redundant backup storage.
To enable zone redundancy using the Azure CLI, use the following example command:
az sql db replica create -g mygroup -s myserver -n originalDb --partner-server newDb -–ha-replicas 1 -–zone-redundant -–backup-storage-redundancy Zone
To make an existing Hyperscale database zone redundant, use Azure PowerShell or the Azure CLI to create a zone redundant Hyperscale database using database copy. The database copy can be in the same or different region as the existing Hyperscale database.
Specify the -ZoneRedundant
parameter to enable zone redundancy for your Hyperscale database copy. The database copy must have at least 1 high availability replica and zone-redundant backup storage must be specified.
To create your zone redundant database using Azure PowerShell, use the following example command:
New-AzSqlDatabaseCopy -ResourceGroupName "myResourceGroup" -ServerName $sourceserver -DatabaseName "databaseName" -CopyResourceGroupName "myCopyResourceGroup" -CopyServerName $copyserver -CopyDatabaseName "zoneRedundantCopyOfMySampleDatabase" -ZoneRedundant -BackupStorageRedundancy Zone
Specify the -zone-redundant parameter
to enable zone redundancy for your Hyperscale database copy. The database copy must have at least 1 high availability replica and zone-redundant backup storage.
To enable zone redundancy using the Azure CLI, use the following example command:
az sql db copy --dest-name "CopyOfMySampleDatabase" --dest-resource-group "myResourceGroup" --dest-server $targetserver --name "<databaseName>" --resource-group "<resourceGroup>" --server $sourceserver -–ha-replicas 1 -–zone-redundant -–backup-storage-redundancy Zone
Learn more about Hyperscale databases in the following articles: