Share via


建立區域備援超大規模資料庫

適用於:Azure SQL Database

本文章教您如何透過建立新資料庫、建立異地複本或使用資料庫複本來建立區域備援超大規模資料庫。

建立區域備援資料庫

使用 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

下一步

在下列文章中深入瞭解超大規模資料庫: