你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

创建区域冗余“超大规模”数据库

适用于:Azure SQL 数据库

本文指导你通过创建新数据库、创建异地副本或使用数据库副本来创建区域冗余型超大规模数据库。

创建区域冗余数据库

使用 Azure PowerShellAzure CLI 创建区域冗余“超大规模”数据库。 确认是否具有最新版本的 API 以确保支持任何最新的变更。

通过使用 Azure PowerShell 指定 -ZoneRedundant 参数,为“超大规模”数据库启用区域冗余。 数据库必须至少具有 1 个高可用性副本,并且必须指定区域冗余备份存储。

若要使用 Azure Powershell 启用区域冗余,请使用以下示例命令:

New-AzSqlDatabase -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database01" `
    -Edition "Hyperscale" -HighAvailabilityReplicaCount 1 -ZoneRedundant -BackupStorageRedundancy Zone -RequestedServiceObjectiveName HS_Gen5_2'

通过创建异地副本来创建数据库

若要使现有的“超大规模”数据库区域冗余,请使用 Azure PowerShell 或 Azure CLI 通过活动异地复制创建区域冗余“超大规模”数据库。 异地副本与现有“超大规模”数据库可以位于同一区域,也可以位于不同区域。

指定 -ZoneRedundant 参数,为“超大规模”数据库辅助数据库启用区域冗余。 辅助数据库必须至少具有 1 个高可用性副本,并且必须指定区域冗余备份存储。

若要使用 Azure PowerShell 创建区域冗余数据库,请使用以下示例命令:

New-AzSqlDatabaseSecondary -ResourceGroupName "myResourceGroup" -ServerName $sourceserver -DatabaseName "databaseName" -PartnerResourceGroupName "myPartnerResourceGroup" -PartnerServerName $targetserver -PartnerDatabaseName "zoneRedundantCopyOfMySampleDatabase" -ZoneRedundant -BackupStorageRedundancy Zone -HighAvailabilityReplicaCount 1

使用数据库副本创建数据库

若要使现有的“超大规模”数据库区域冗余,请使用 Azure PowerShell 或 Azure CLI 通过数据库副本创建区域冗余“超大规模”数据库。 数据库副本与现有“超大规模”数据库可以位于同一区域,也可以位于不同区域。

指定 -ZoneRedundant 参数,为“超大规模”数据库副本启用区域冗余。 数据库副本必须至少具有 1 个高可用性副本,并且必须指定区域冗余备份存储。

若要使用 Azure PowerShell 创建区域冗余数据库,请使用以下示例命令:

New-AzSqlDatabaseCopy -ResourceGroupName "myResourceGroup" -ServerName $sourceserver -DatabaseName "databaseName" -CopyResourceGroupName "myCopyResourceGroup" -CopyServerName $copyserver -CopyDatabaseName "zoneRedundantCopyOfMySampleDatabase" -ZoneRedundant -BackupStorageRedundancy Zone

后续步骤

在以下文章中详细了解超大规模数据库: