Databases - Update

更新現有的資料庫。

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}?api-version=2021-11-01

URI 參數

名稱 位於 必要 類型 Description
databaseName
path True

string

資料庫的名稱。

resourceGroupName
path True

string

包含資源的資源群組名稱。 您可以從 Azure 資源管理員 API 或入口網站取得這個值。

serverName
path True

string

伺服器的名稱。

subscriptionId
path True

string

可識別 Azure 訂用帳戶的訂用帳戶識別碼。

api-version
query True

string

要用於要求的 API 版本。

要求本文

名稱 類型 Description
identity

DatabaseIdentity

資料庫身分識別

properties.autoPauseDelay

integer

在幾分鐘后自動暫停資料庫的時間。 值為 -1 表示自動暫停已停用

properties.catalogCollation

CatalogCollationType

元資料目錄的定序。

properties.collation

string

資料庫的定序。

properties.createMode

CreateMode

指定資料庫建立模式。

默認值:一般資料庫建立。

複製:建立資料庫做為現有資料庫的複本。 sourceDatabaseId 必須指定為源資料庫的資源標識碼。

次要:建立資料庫做為現有資料庫的次要複本。 sourceDatabaseId 必須指定為現有主資料庫的資源標識碼。

PointInTimeRestore:藉由還原現有資料庫的時間點備份來建立資料庫。 sourceDatabaseId 必須指定為現有資料庫的資源標識符,而且必須指定 restorePointInTime。

復原:藉由還原異地復寫備份來建立資料庫。 sourceDatabaseId 必須指定為可復原的資料庫資源標識碼,才能還原。

還原:藉由還原已刪除資料庫的備份來建立資料庫。 必須指定sourceDatabaseId。 如果 sourceDatabaseId 是資料庫的原始資源識別碼,則必須指定 sourceDatabaseDeletionDate。 否則,sourceDatabaseId 必須是可還原的卸除資料庫資源標識符,而且會忽略 sourceDatabaseDeletionDate。 restorePointInTime 也可以指定從先前的時間點還原。

RestoreLongTermRetentionBackup:從長期保留保存庫還原來建立資料庫。 recoveryServicesRecoveryPointResourceId 必須指定為恢復點資源標識符。

DataWarehouse 版本不支援 Copy、Secondary 和 RestoreLongTermRetentionBackup。

properties.elasticPoolId

string

包含此資料庫之彈性集區的資源標識碼。

properties.federatedClientId

string

每個資料庫 CMK 案例用於跨租使用者的用戶端識別碼

properties.highAvailabilityReplicaCount

integer

與用來提供高可用性之資料庫相關聯的次要複本數目。 不適用於彈性集區內的超大規模資料庫。

properties.isLedgerOn

boolean

不論此資料庫是否為總賬資料庫,這表示資料庫中的所有數據表都是總賬數據表。 注意:建立資料庫之後,無法變更此屬性的值。

properties.licenseType

DatabaseLicenseType

要套用此資料庫的授權類型。 LicenseIncluded如果您需要授權,或BasePrice如果您有授權且符合 Azure Hybrid Benefit 資格。

properties.longTermRetentionBackupResourceId

string

與此資料庫建立作業相關聯的長期保留備份資源標識符。

properties.maintenanceConfigurationId

string

指派給資料庫的維護組態標識碼。 此組態會定義維護更新發生的期間。

properties.maxSizeBytes

integer

以位元組表示的資料庫大小上限。

properties.minCapacity

number

資料庫一律已配置的最小容量,如果未暫停,則為

properties.readScale

DatabaseReadScale

唯讀路由的狀態。 如果啟用,則應用程式意圖在其 連接字串 中設定為唯讀的連線,可能會路由傳送至相同區域中的唯讀次要複本。 不適用於彈性集區內的超大規模資料庫。

properties.recoverableDatabaseId

string

與此資料庫建立作業相關聯的可復原資料庫資源標識符。

properties.recoveryServicesRecoveryPointId

string

與此資料庫建立作業相關聯的恢復點資源標識碼。

properties.requestedBackupStorageRedundancy

BackupStorageRedundancy

用來儲存此資料庫的備份的記憶體帳戶類型。

properties.restorableDroppedDatabaseId

string

與這個資料庫的建立作業相關聯的可還原卸除資料庫資源標識符。

properties.restorePointInTime

string

指定將還原以建立新資料庫之源資料庫) 格式 (ISO8601 時間點。

properties.sampleName

SampleName

建立此資料庫時要套用的範例架構名稱。

properties.secondaryType

SecondaryType

如果資料庫是次要資料庫,則為次要類型。 有效值為 Geo 和 Named。

properties.sourceDatabaseDeletionDate

string

指定刪除資料庫的時間。

properties.sourceDatabaseId

string

與此資料庫建立作業相關聯的源資料庫資源標識符。

properties.zoneRedundant

boolean

不論此資料庫是否為區域備援,這表示此資料庫的複本將會分散到多個可用性區域。

sku

Sku

SKU 的名稱和層級。

tags

object

資源標籤。

回應

名稱 類型 Description
200 OK

Database

已成功更新資料庫。

202 Accepted

正在更新資料庫。

Other Status Codes

錯誤回應: ≦

  • 400 InvalidDatabaseCreateOrUpdateRequest - 建立或更新資料庫作業的要求本文無效。

  • 400 InvalidResourceId - 無效的資源識別碼。

  • 400 InvalidSourceDatabaseId - 無效的源資料庫標識符。

  • 400 不符ResourceGroupNameWithUrl - 提供的資源組名與 URL 中的名稱不符。

  • 400 不相符ServerNameWithUrl - 提供的伺服器名稱與 URL 中的名稱不符。

  • 400 不符SubscriptionWithUrl - 提供的訂用帳戶不符合 URL 中的訂用帳戶。

  • 400 MissingCollation - 需要定序。

  • 400 MissingMaxSizeBytes - 需要 MaxSizeBytes。

  • 400 MissingSkuName - 需要 Sku 名稱。

  • 400 MissingSourceDatabaseId - 遺漏源資料庫標識符。

  • 400 InvalidLicenseType - 指定的授權類型無效。

  • 400 InvalidSkuName - 無效的 SKU 名稱。

  • 400 不相符的SkuNameAndCapacity - SKU 名稱和容量不符。

  • 400 不符SkuNameAndTier - SKU 名稱和層之間的不符。

  • 400 不符SkuNameAndFamily - SKU 名稱和系列之間的不符。

  • 400 LedgerNotAllowedWithSpecifiedCreateMode - IsLedgerOn 不允許使用指定的建立模式。

  • 400 LedgerNotAllowedOnSampleDatabase - 範例資料庫的 IsLedgerOn 不允許建立資料庫。

  • 400 DatabaseNameDoesNotMatchSourceDatabaseId - 指定的資料庫名稱不符合 sourceDatabaseId 中的資料庫名稱。

  • 400 ElasticPoolNotSupportedForExternalBackupRestore - 外部備份還原不支持彈性集區

  • 400 InvalidRecoverableDatabaseId - 可復原的資料庫標識碼無效。

  • 400 InvalidRecoveryServicesRecoveryPointId - 無效的復原服務恢復點標識符。

  • 400 InvalidRestorableDroppedDatabaseDeletionDate - 指定的可還原卸除資料庫刪除日期無效

  • 400 InvalidRestorableDroppedDatabaseId - 可還原的已卸除資料庫標識符無效

  • 400 MissingRecoverableDatabaseId - 遺漏可復原的資料庫標識符。

  • 400 MissingRecoveryServicesRecoveryPointId - 遺漏復原服務恢復點標識符。

  • 400 MissingRestorableDroppedDatabaseId - 遺漏 restorableDroppedDatabaseId

  • 400 MissingRestorePointInTime - 遺漏還原時間點

  • 400 MissingSourceDatabaseDeletionDate - 遺漏源資料庫刪除日期

  • 400 MissingStorageContainerSasToken - 遺漏記憶體容器 SAS 令牌

  • 400 MissingStorageContainerUri - 遺漏記憶體容器 URI

  • 400 RestoreableDroppedDatabaseIdGivenForRestoreWithSourceDatabaseId - 無法在還原建立模式中指定 sourceDatabaseId 時指定 restoreableDroppedDatabaseId

  • 400 MultipleIdentitiesOnDatabase - 資料庫層級僅支援一個使用者指派的受控識別。

  • 400 MultipleIdentityDelegationsOnDatabase - 資料庫層級僅支援一個身分識別委派。

  • 400 MissingPrimaryDelegatedIdentityClientId - 若要使用委派的身分識別,請提供主要委派的身分識別用戶端標識符。

  • 400 LongTermRetentionMigrationRequestNotSupported - 不允許訂用帳戶 LTR 備份移轉功能。

  • 400 LongTermRetentionMigrationCrossClusterRequestNotSupported - 不允許來源和目標訂用帳戶進行 LTR 備份複製功能通訊。

  • 400 LongTermRetentionMigrationParameterMissing - 作業遺漏的必要參數。

  • 400 LongTermRetentionMigrationSameServerNotSupported - 不支援在相同伺服器內複製 LTR 備份。

  • 400 LongTermRetentionMigrationTargetServerNotFound - 目標伺服器不存在或尚未準備好進行 LTR 備份複製作業。

  • 400 LongTermRetentionMigrationTargetDatabaseNotFound - 目標資料庫不存在於伺服器上。

  • 400 LongTermRetentionMigrationStorageTypeNotSupported - 目標區域中不支援指定的備份記憶體備援。

  • 400 LongTermRetentionMigrationStorageMismatch - 資料庫的主動備份備援不符合客戶所要求的備份備援。

  • 400 LongTermRetentionMigrationDatabaseTypeNotSupported - 只有受控實例和 Azure SQL DB LTR 備份才支援 LTR 移轉。

  • 400 LongTermRetentionMigrationBackupStorageRedundancyNotAllowed - LTR 複製作業不允許變更備份記憶體備援。

  • 400 LongTermRetentionMigrationSubscriptionNotFound - 找不到訂用帳戶。

  • 400 InvalidStandbyGeoReadScale - 用戶嘗試在不支援它的待命異地資料庫上啟用讀取規模。

  • 400 PerDatabaseCMKKeyRotationAttemptedWhileOldThumbprintInUse - 資料庫層級 TDE 保護裝置的密鑰輪替會在使用中交易保留使用舊密鑰加密的記錄時遭到封鎖。 如需解決此問題的可能策略,請參閱 aka.ms/azuresqldbkeyrotation。

  • 400 TierChangeUnsupportedDueToMemoryOptimizedObject - 資料庫無法更新其 SKU,因為它具有記憶體優化物件。

  • 在資料庫上啟用長期備份保留時,不支援 400 PerDBCMKNotSupportedWithLTR - 資料庫層級 CMK。

  • 400 SourceServerNotFound - CreateDatabaseAsCopy API 呼叫中提供之源資料庫標識符的伺服器部分不會對應至現有的伺服器。

  • 400 ElasticPoolOverStorageUsage - 當達到彈性集區的記憶體限制時,嘗試將數據寫入資料庫。

  • 400 InvalidDatabaseCreateMode - 建立資料庫的要求無效。

  • 400 MissingAsymmetricKeyOnTargetServer - 目標伺服器無法存取非對稱密鑰。

  • 400 MatchingSubscriptionWithUrl - 提供的訂用帳戶不符合 URL 中的訂用帳戶。

  • 400 MultipleDroppedDatabasesWithTheSameName - 在伺服器上找到多個具有相同名稱的卸除資料庫。

  • 400 InvalidAddSecondaryPermission - 使用者沒有足夠的許可權可新增指定伺服器上的輔助伺服器。

  • 400 AzureKeyVaultClientError - Azure 金鑰保存庫 客戶端發生錯誤。

  • 400 UnsupportedServiceName - 指定的名稱是無效的名稱,因為它包含一或多個不支援的 Unicode 字元。

  • 400 AzureKeyVaultClientInfoError - 取得 Azure 金鑰保存庫 客戶端的資訊時發生錯誤。

  • 400 CurrentDatabaseLogSizeExceedsMaxSize - 使用者嘗試將資料庫變更為記錄大小低於目前使用量的 SKU。

  • 400 IsLedgerDatabaseIsNotSupportedOnResourceType - 此資源類型不支持變更總賬屬性。

  • 400 InvalidBackupStorageAccountType - 使用者在資料庫建立/更新期間傳遞 zrs/lrs,但失敗的原因可能是客戶未列入允許清單,或因為 zrs 無法在指定的區域中使用。

  • 400 CannotUpdateToFreeDatabase - 不支援將資料庫更新至免費 SKU。

  • 400 DatabaseInvalidSkuPropertyCombination - 要求 SKU 的屬性不一致。 請檢查是否已指定有效的組合。 如需更多詳細資料,請參閱 https://docs.microsoft.com/en-us/rest/api/sql/capabilities/listbylocation#serviceobjectivecapability \(英文\)。

  • 400 DatabaseNamedReplicaPerDatabaseLimitExceeded - 用戶嘗試建立具名複本,該復本會超過每個主資料庫允許的數目

  • 400 UnsupportedBackupStorageRedundancyForEdition - 版本不支援要求的備份記憶體備援

  • 400 DatabaseIsCurrentlyPinned - Microsoft 已將您的資料庫釘選 SQL Server 引擎版本。 為了確保您的資料庫不會遇到生產問題,資料庫上任何未來的調整作業都會遭到封鎖,直到它未釘選為止。 請連絡 Microsoft 支援服務以取得調整的協助。

  • 400 RestoreTargetEditionSizeInsufficient - 使用者嘗試將資料庫還原到小於目前配置來源大小的版本。

  • 400 InvalidSku - 使用者指定了無效的 SKU。

  • 400 InvalidTierSkuCombination - 指定的層不支援指定的 SKU。

  • 400 ServerNotFound - 找不到要求的伺服器。

  • 400 不支援BackupStorageRedundancy - 目標區域中不支援指定的備份記憶體備援。

  • 400 InvalidIdentityId - 提供的一或多個身分識別標識碼 () 不是有效的 ARM 資源識別碼 (s) 。 請輸入 () 的有效標識符,然後再試一次。

  • 400 LTRSterlingToVldbMigrationNotSupported - 無法將資料庫的服務目標變更為超大規模資料庫,因為超大規模資料庫尚未支持長期保留。 請停用資料庫的長期保留,然後再試一次。

  • 400 TokenTooLong - 提供的令牌太長。

  • 400 FeatureDisabledOnSelectedEdition - 用戶嘗試使用目前資料庫版本停用的功能。

  • 400 OfferDisabledOnSubscription - 訂用帳戶供應項目類型受限於布建要求的資源。

  • 400 UnableToCreateGeoChain - 用戶嘗試建立輔助資料庫 (鏈結) 即使已設定自動上傳總帳摘要

  • 400 InvalidNumberOfIdentities - 資料庫層級僅支援一個使用者指派的受控識別。

  • 400 DatabaseNamedReplicaChainingNotAllowed - 用戶嘗試建立不允許之具名複本的具名複本。

  • 400 DatabaseNamedReplicaInvalidOperation - 使用者嘗試在具名復本上執行不支持的作業。

  • 400 DatabaseNamedReplicaInvalidSourceDatabase - 用戶嘗試在與源資料庫不同的訂用帳戶或區域中建立具名複本。

  • 400 InvalidTargetSubregion - 不可讀取次要複本的目標伺服器不在 DR 配對的 Azure 區域中。

  • 400 CannotAssignIdentityToMaster - 無法將身分識別指派給系統資料庫。 資料庫識別無法指派給 'master'、'model'、'tempdb'、'msdb' 或 'resource' 資料庫。

  • 400 PerDatabaseCMKDWNotSupported - Datawarehouse 版本不支援預覽中的資料庫層級 CMK。

  • 400 DatabaseCreationBlockedForNonActivatedCMKServer - 啟用 CMK 的工作區會封鎖 SQL 集區建立,直到工作區啟用為止。 首先,啟用清除保護,並在工作區密鑰的 Azure 金鑰保存庫 上,將所需的許可權授與工作區受控識別, (取得、包裝密鑰、解除包裝密鑰) 。 接下來,在授與存取權之後啟用工作區。

  • 400 PartnerServerNotCompatible - 使用者正嘗試將資料庫從 SAWA V1 伺服器複製到一部批注伺服器,反之亦然。

  • 400 IncorrectReplicationLinkState - 作業預期資料庫在復寫連結上處於預期狀態。

  • 400 TargetElasticPoolDoesNotExist - 彈性集區不存在於伺服器上。

  • 400 ElasticPoolSkuCombinationInvalid - 只有在 sku 指定為 'ElasticPool' 時,才能一起指定彈性集區和 SKU。

  • 400 ElasticPoolTierCombinationInvalid - 資料庫層與彈性集區服務層級不同。

  • 400 ElasticPoolNameRequired - 用戶嘗試建立或更新彈性集區服務目標的資料庫,而不需指定彈性集區的名稱。

  • 400 MissingThumbprintCrm - CRM 資料庫的還原作業失敗,因為缺少必要的 TDE 憑證。 請重試還原作業至現有的彈性集區。

  • 400 ElasticPoolOverStorage - 當達到彈性集區的記憶體限制時,嘗試將數據寫入資料庫。

  • 400 ElasticPoolInconsistentDtuGuaranteeSettings - 嘗試為彈性集區中超過所要求 DTU 的資料庫提供 DTU 分鐘。

  • 400 RestoreTargetEditionSizeInsufficientV2 - 使用者嘗試將資料庫還原至小於已還原資料庫配置大小的版本。

  • 400 TierChangeUnsupportedDueToCDCEnabledDatabase - 資料庫無法更新其 SKU,因為它已啟用 CDC。

  • 400 ElasticPoolDatabaseCountOverLimit - 當達到彈性集區的資料庫計數限制時,嘗試建立或新增資料庫至彈性集區。

  • 400 ResourcePoolStorageLimitHitDuringRestore - 還原的資料庫無法還原到資源集區,因為集區中剩餘的記憶體容量。

  • 400 CannotChangeToOrFromDataWarehouseTier - 使用者嘗試將資料庫的 SKU 從 DataWarehouse 層變更為非 DataWarehouse 層,反之亦然。

  • 400 CurrentDatabaseSizeExceedsMaxSize - 使用者嘗試將資料庫的大小上限縮減為小於目前使用量的大小。

  • 400 PerDatabaseCMKRestoreNotSupported - 在預覽中設定資料庫層級 CMK 時,不支持資料庫還原。

  • 400 PerDatabaseCMKHSNotSupported - 超大規模資料庫版本不支援預覽版的資料庫層級 CMK。

  • 400 AzureKeyVaultKeyDisabled - 無法在伺服器上完成作業,因為 Azure 金鑰保存庫 密鑰已停用。

  • 400 PerDatabaseCMKGeoReplicationNotSupported - 在預覽中設定資料庫層級 CMK 時,不支援異地復寫和資料庫複本。

  • 400 ElasticPoolDecreaseStorageLimitBelowUsage - 嘗試降低其記憶體使用量下方彈性集區的儲存限制。

  • 400 AzureKeyVaultInvalidExpirationDate - 作業無法完成,因為 Azure 金鑰保存庫 密鑰到期日無效。

  • 400 InvalidStandbyGeoEdition - 用戶嘗試建立以 DTU 為基礎的待命地理位置。

  • 400 SecurityAzureKeyVaultUrlNullOrEmpty - 作業無法完成,因為 Azure 金鑰保存庫 Uri 為 Null 或空白。

  • 400 ElasticPoolInconsistentVcoreGuaranteeSettings - 每個資料庫的資料庫數目和 VCore 最小值不能超過彈性集區的要求 VCore。

  • 400 UpdateNotAllowedOnPausedDatabase - 使用者嘗試在暫停的資料庫上執行更新。

  • 400 GeoRestoreBackupStorageTypeNotSupported - 針對未設定為使用異地備援備份記憶體的資料庫發出資料庫復原要求時無效。

  • 400 RestoreHyperscaleToNonHyperscale - 不支援將超大規模資料庫備份還原至非超大規模資料庫服務層級,反之亦然。

  • 400 SubscriptionDoesNotHaveAccessToServer - 訂用帳戶無法存取指定的伺服器 ()

  • 400 RecoveryPointDoesNotExist - 指定的恢復點不存在或無效。

  • 400 AzureKeyVaultNoServerIdentity - 未正確設定伺服器識別。

  • 400 InvalidMaxSizeTierCombination - 指定的層不支援指定的資料庫大小上限。

  • 400 LtrBackupNotFound - 指定的長期保留備份不存在。

  • 400 AzureKeyVaultInvalidUri - 來自 Azure 金鑰保存庫 無效的回應。 請使用有效的 Azure 金鑰保存庫 URI。

  • 400 InvalidPointInTime - 指定的時間點對資料庫無效。

  • 400 AzureKeyVaultMissingPermissions - 伺服器缺少 Azure 金鑰保存庫 的必要許可權。

  • 400 GeoRestoreCannotResolveTargetCluster - 無法解析伺服器的目標叢集

  • 400 InvalidReadScaleEdition - 用戶嘗試在不支援它的資料庫類型上啟用讀取規模。

  • 400 CannotSpecifyEditionOrSloWhenRestoringToPool - 還原至彈性集區時不支援指定目標服務等級目標或版本。

  • 400 InvalidReadScaleUnits - 用戶嘗試提供不支持的讀取小數字數值。

  • 400 RestoreNotSupportedForGeoDrSecondary - 目前設定為異地次要資料庫的資料庫不支持時間點還原和資料庫復原作業。

  • 400 SecurityAzureKeyVaultInvalidKeyName - 作業無法完成,因為伺服器密鑰名稱無效。

  • 400 RegionDoesNotSupportVersion - 用戶嘗試在不支援該伺服器版本的位置中建立指定版本的伺服器。

  • 400 GeoSecondaryMaxSizeUpdateFailed - 異地輔助資料庫是不支援所要求 maxsize 值的 SLO,或異地輔助資料庫位於不支援的區域,或異地輔助資料庫上的更新作業已在進行中。

  • 400 AdalGenericError - 作業無法完成,因為發生 Azure Active Directory 錯誤。

  • 400 AdalServicePrincipalNotFound - 作業無法完成,因為發生 Azure Active Directory 連結庫服務主體找不到錯誤。

  • 400 InvalidTier - 使用者指定了無效的階層。

  • 400 AzureKeyVaultMalformedVaultUri - 提供的 金鑰保存庫 URI 無效。

  • 400 CannotUseReservedDatabaseName - 無法在此作業中使用保留的資料庫名稱。

  • 400 RequestedDatabaseSizeRequiresShrink - 使用者嘗試 ALTER DATABASE MODIFY MAXSIZE,將資料庫的 MAXSIZE 修改為較小的大小,然後再修改目前的大小。

  • 400 CurrentDatabaseSizeExceedsDbMaxSize - 使用者嘗試將資料庫的大小上限縮減為小於目前使用量的大小。

  • 400 InvalidServerName - 指定的伺服器名稱無效。

  • 400 CannotUseTrailingWhitespacesInDatabaseName - 資料庫名稱驗證失敗。

  • 400 SourceDatabaseEditionCouldNotBeUpgraded - 源資料庫的版本不能高於目標資料庫。

  • 400 SecurityAdalPrincipalCertExpiredError - 作業無法完成,因為 Azure 金鑰保存庫 主體憑證已過期。

  • 400 TargetDatabaseEditionCouldNotBeDowngraded - 目標資料庫的版本不能低於源資料庫。

  • 400 UpdateNotAllowedIfGeoDrOperationInProgress - 不允許此作業,因為伺服器 '{1}' 上資料庫 '{0}' 的複製或故障轉移作業目前正在進行中。

  • 400 InvalidCollation - 伺服器無法辨識定序。

  • 400 SecurityInvalidAzureKeyVaultRecoveryLevel - 提供的 金鑰保存庫 uri 無效。

  • 400 KeyMaterialNotFoundOnRemoteServer - 遠端伺服器無法存取做為 TDE 保護裝置的金鑰數據。

  • 400 AzureKeyVaultRsaKeyNotSupported - 提供的密鑰保存庫使用不支援的 RSA 金鑰大小或密鑰類型。 支援的 RSA 金鑰大小為 2048 或 3072,金鑰類型為 RSA 或 RSA-HSM。

  • 400 SameKeyMaterialNotFoundOnRemoteServer - 輔助伺服器沒有主伺服器加密保護裝置的密鑰數據。

  • 400 ElasticPoolOverFileSpace - 彈性集區中的檔案空間不足。

  • 400 PartnerDBNotCompatibleForSGXEnclave - 只有在兩個資料庫都在 DC 系列硬體上執行時,才支援設定已啟用記憶體保護區之資料庫的 GeoDR 連結或更新 SLO。

  • 400 UpdateNotAllowedInCurrentReplicationState - 目前復寫狀態的資料庫上不允許此作業。

  • 400 InvalidLicenseType - 用戶嘗試使用不支援的授權類型來建立或更新資料庫或彈性集區。

  • 400 GeoReplicaLimitReached - 已達到每個複本複寫限制。

  • 400 UnsupportedCapacity - 用戶嘗試使用不支援的容量來建立或更新資料庫。

  • 400 ReplicationSourceAndTargetMustHaveSameName - 複寫來源和目標資料庫必須具有相同的名稱。

  • 400 ProvisioningDisabled - 依原樣顯示資源作業授權者的錯誤訊息,而不需變更

  • 400 ReplicationSourceAndTargetMustBeInDifferentServers - 複寫來源和目標資料庫必須位於不同的邏輯伺服器中。

  • 400 CannotUpdateIsLedgerDatabase - 無法更新現有資料庫的總賬屬性。

  • 400 UnableToResolveRemoteServer - 遠端夥伴伺服器名稱因伺服器名稱無效或 DNS 連線問題而無法解決。

  • 400 RemoteDatabaseCopyPermission - 用戶沒有足夠的許可權在指定的伺服器上建立資料庫複本。

  • 400 CannotMoveOrDropSyncMetadataDatabase - 無法卸除用來作為同步元數據資料庫的資料庫。

  • 400 SecurityAzureKeyVaultGeoChainError - 使用 Azure 金鑰保存庫 (BYOK) 啟用透明數據加密時,不支援建立次要 (次要 (稱為鏈結) 的程式。

  • 400 RestoreToFreeEditionNotSupported - 還原和 GeoRestore 目標不能是免費資料庫。

  • 400 CannotMoveOrDropJobAccountDatabase - 無法卸除與作業帳戶相關聯的資料庫。

  • 400 RestoreNotSupportedForFreeEdition - 免費資料庫不支援還原和 GeoRestore。

  • 400 JobAgentDatabaseEditionUnsupported - 不支援指定的資料庫服務等級目標做為作業代理程序資料庫使用。

  • 400 InvalidDroppedDatabase - 在支持的復原期間內,卸除的源資料庫不存在於伺服器上。

  • 400 InvalidLiveDatabase - 源資料庫不存在於支援的復原期間內。 如果還原已卸除的資料庫,請指定其刪除日期。

  • 400 InvalidVldbRecoverySlo - 超大規模資料庫復原需要來源和目標資料庫才能使用超大規模資料庫服務等級目標。

  • 400 SourceDatabaseNotFound - 源資料庫不存在。

  • 400 InvalidVldbRestoreSlo - 超大規模資料庫時間點還原需要來源和目標資料庫才能使用超大規模資料庫服務等級目標。

  • 400 CannotSpecifyPoolOrSlo - 版本不支援指定彈性集區和/或變更服務等級目標或版本。

  • 400 InvalidPublicMaintenanceConfiguration - 使用者嘗試指定公用維護設定,無法轉換成內部標識碼 (格式不正確或錯誤的區域) 。

  • 400 MaintenanceWindowNotSupportedForNamedReplica - 用戶嘗試使用不支援的非預設維護時段建立或更新具名複本。

  • 400 ChangeUnsupportedOnEntity - 用戶嘗試在指定的實體上嘗試不受支援的建立/更新/刪除作業。

  • 404 OperationIdNotFound - 標識符為 的作業不存在。

  • 404 SubscriptionDoesNotHaveServer - 找不到要求的伺服器

  • 404 ServerNotInSubscriptionResourceGroup - 指定的伺服器不存在於指定的資源群組和訂用帳戶中。

  • 404 LongTermRetentionMigrationBackupNotFound - 指定的 LTR 備份不存在。

  • 404 DatabaseDoesNotExist - 使用者已指定不存在於此伺服器實例上的資料庫名稱。

  • 404 ServerNotInSubscriptionResourceGroup - 指定的伺服器不存在於指定的資源群組和訂用帳戶中。

  • 404 SubscriptionNotFound - 找不到要求的訂用帳戶。

  • 404 ServerNotInSubscription - 指定的伺服器不存在於指定的訂用帳戶上。

  • 404 CannotFindObject - 找不到對象,因為物件不存在或您沒有許可權

  • 405 UnsupportedReplicationOperation - 資料庫上已起始不支持的復寫作業。

  • 409 OperationCancelled - 使用者已取消作業。

  • 409 OperationInterrupted - 無法完成資源上的作業,因為它被相同資源上的另一個作業中斷。

  • 409 LongTermRetentionMigrationRequestConflict - 此 LTR 備份上的衝突作業仍在進行中。

  • 409 LongTermRetentionMigrationBackupConflict - 目標資料庫有另一個備份時間相同的 LTR 備份存在。

  • 409 FreeDbAlreadyExists - 每個區域的訂用帳戶只能有一個免費資料庫。

  • 409 ConflictingServerOperation - 伺服器目前正在進行作業。

  • 409 SubscriptionDisabled - 已停用訂用帳戶。

  • 409 ConflictingSystemOperationInProgress - 資料庫上的系統維護作業正在進行中,而進一步的作業必須等到完成為止。

  • 409 ConflictRequestToUpdateBackupRedundancy - 變更備份記憶體備援的衝突要求仍在進行中。

  • 409 SkuAssignmentInProgress - 無法處理目前的指派要求,因為先前的要求尚未完成。

  • 409 DatabaseElasticPoolMaintenanceConflict - 用戶嘗試使用與資料庫彈性集區衝突的指定維護組態來建立或更新資料庫。

  • 409 ServerDtuQuotaExceeded - 無法執行作業,因為伺服器會超過允許的資料庫輸送量單位配額。

  • 409 UnableToAlterDatabaseInReplication - 在復寫關聯性中的資料庫上用戶改變的版本。

  • 409 SubscriptionVcoreQuotaExceeded - 無法執行作業,因為訂用帳戶會超過允許的虛擬核心配額。

  • 409 CurrentMemoryUsageExceedsSkuQuota - 使用者嘗試因為資源耗用量較高而無法完成的 SKU 更新作業。

  • 409 ServerKeyNameAlreadyExists - 伺服器密鑰已存在於伺服器上。

  • 409 ServerKeyUriAlreadyExists - 伺服器密鑰 URI 已存在於伺服器上。

  • 「409 ServerKeyDoesNotExists - 伺服器金鑰不存在。」

  • 409 UpdateSloInProgress - 使用者嘗試在進行 SLO 更新時起始不相容的作業。

  • 409 UpdateSloFailedDatabaseTooBusy - 更新 SLO 作業無法完成,因為資料庫太忙碌。

  • 409 ElasticPoolBusy - 在忙碌的彈性集區上嘗試管理作業。

  • 409 AzureKeyVaultKeyNameNotFound - 作業無法完成,因為 Azure 金鑰保存庫 密鑰名稱不存在。

  • 409 AzureKeyVaultKeyInUse - 伺服器目前正在使用密鑰。

  • 409 ServerDisabled - 伺服器已停用。

  • 409 ConflictingDatabaseOperation - 資料庫上已經有一些作業,目前的作業應該等到完成為止。

  • 409 SimultaneousSkuChangeNotAllowed - 服務目標變更作業無法同時在復寫關聯性的兩個資料庫上執行。

  • 409 TargetElasticPoolBeingUpdated - 無法啟動彈性集區的更新,因為此彈性集區中的其中一個資料庫正在進行複製作業

  • 409 InvalidOperationForDatabaseNotInReplicationRelationship - 已在復寫關聯性中的資料庫上執行複寫植入作業。

  • 409 InvalidOperationForDatabaseInReplicationRelationship - 已在復寫關聯性中的資料庫上執行複寫植入作業。

  • 409 DuplicateGeoDrRelation - 資料庫已經在復寫關聯中。 這是重複的要求。

  • 409 DatabaseCopyLimitPerReplicaReached - 用戶達到並行資料庫複本的限制。

  • 409 RemoteDatabaseExists - 目的地資料庫名稱已存在於目的地伺服器上。

  • 429 SubscriptionTooManyCreateUpdateRequests - 超出可用資源可處理之最大要求的要求。

  • 429 SubscriptionTooManyRequests - 超出可用資源可處理之最大要求的要求。

  • 429 SubscriptionTooManyCreateUpdateRequests - 超出可用資源可處理之最大要求的要求。

  • 429 SubscriptionTooManyRequests - 超出可用資源可處理之最大要求的要求。

  • 500 OperationTimedOut - 作業逾時並自動回復。 請重試該作業。

  • 500 LongTermRetentionMigrationRequestFailedToStartOnTarget - 無法在目標區域中啟動 LTR 備份複製要求。

  • 500 LongTermRetentionMigrationRequestCopyFailed - LTR 備份 Blob 的複製作業失敗。

  • 500 LongTermRetentionMigrationRestoreVerExceeded - 達到最大嘗試之後還原驗證失敗。

  • 500 LongTermRetentionMigrationRestoreVerFailed - 還原驗證失敗。

  • 500 ActivateOrDeactivateWorkflowThrottling - 啟用或停用工作流程失敗,因為並行工作流程太多

  • 503 TooManyRequests - 超出可用資源可處理之最大要求的要求。

  • 503 TooManyRequests - 超出可用資源可處理之最大要求的要求。

  • 503 AzureKeyVaultConnectionFailed - 無法在伺服器上完成作業,因為嘗試連線到 Azure 金鑰保存庫 失敗

  • 503 AzureKeyVaultGenericConnectionError - 作業無法完成,因為嘗試擷取 金鑰保存庫 資訊時發生錯誤。

  • 503 DatabaseUnavailable - 作業失敗,因為資料庫無法使用。

  • 504 RequestTimeout - 服務要求超過允許的逾時。

範例

Assigns maintenance window to a database.
Resets maintenance window of a database to default.
Updates a database.

Assigns maintenance window to a database.

Sample Request

PATCH https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb?api-version=2021-11-01

{
  "sku": {
    "name": "BC_Gen5_4"
  },
  "properties": {
    "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1"
  }
}

Sample Response

{
  "sku": {
    "name": "BC_Gen5",
    "tier": "BusinessCritical",
    "capacity": 4
  },
  "kind": "v12.0,user,vcore",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 1073741824,
    "status": "Online",
    "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "currentServiceObjectiveName": "BC_Gen5_2",
    "requestedServiceObjectiveName": "BC_Gen5_2",
    "defaultSecondaryLocation": "North Europe",
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "licenseType": "LicenseIncluded",
    "maxLogSizeBytes": 104857600,
    "currentBackupStorageRedundancy": "Geo",
    "requestedBackupStorageRedundancy": "Geo",
    "isLedgerOn": false,
    "isInfraEncryptionEnabled": false,
    "zoneRedundant": false,
    "readScale": "Enabled",
    "earliestRestoreDate": "2017-06-07T04:51:33.937Z",
    "currentSku": {
      "name": "BC_Gen5",
      "tier": "BusinessCritical",
      "capacity": 4
    },
    "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1"
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases"
}

Resets maintenance window of a database to default.

Sample Request

PATCH https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb?api-version=2021-11-01

{
  "sku": {
    "name": "BC_Gen5_4"
  },
  "properties": {
    "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default"
  }
}

Sample Response

{
  "sku": {
    "name": "BC_Gen5",
    "tier": "BusinessCritical",
    "capacity": 4
  },
  "kind": "v12.0,user,vcore",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 1073741824,
    "status": "Online",
    "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "currentServiceObjectiveName": "BC_Gen5_4",
    "requestedServiceObjectiveName": "BC_Gen5_4",
    "defaultSecondaryLocation": "North Europe",
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "licenseType": "LicenseIncluded",
    "maxLogSizeBytes": 104857600,
    "currentBackupStorageRedundancy": "Geo",
    "requestedBackupStorageRedundancy": "Geo",
    "isLedgerOn": false,
    "isInfraEncryptionEnabled": false,
    "zoneRedundant": false,
    "readScale": "Enabled",
    "earliestRestoreDate": "2017-06-07T04:51:33.937Z",
    "currentSku": {
      "name": "BC_Gen5",
      "tier": "BusinessCritical",
      "capacity": 4
    }
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases"
}

Updates a database.

Sample Request

PATCH https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb?api-version=2021-11-01

{
  "sku": {
    "name": "BC_Gen4_4"
  },
  "properties": {
    "maxSizeBytes": 1073741824,
    "licenseType": "LicenseIncluded"
  }
}

Sample Response

{
  "sku": {
    "name": "BC_Gen4",
    "tier": "BusinessCritical",
    "capacity": 4
  },
  "kind": "v12.0,user,vcore",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 1073741824,
    "status": "Online",
    "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "currentServiceObjectiveName": "BC_Gen4_2",
    "requestedServiceObjectiveName": "BC_Gen4_2",
    "defaultSecondaryLocation": "North Europe",
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "licenseType": "LicenseIncluded",
    "maxLogSizeBytes": 104857600,
    "isInfraEncryptionEnabled": false,
    "zoneRedundant": false,
    "readScale": "Enabled",
    "earliestRestoreDate": "2017-06-07T04:51:33.937Z",
    "currentSku": {
      "name": "BC_Gen4",
      "tier": "BusinessCritical",
      "capacity": 4
    },
    "currentBackupStorageRedundancy": "Geo",
    "requestedBackupStorageRedundancy": "Local",
    "isLedgerOn": false
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases"
}

定義

名稱 Description
BackupStorageRedundancy

用來儲存此資料庫的備份的記憶體帳戶類型。

CatalogCollationType

元資料目錄的定序。

CreateMode

指定資料庫建立模式。

默認值:一般資料庫建立。

複製:建立資料庫做為現有資料庫的複本。 sourceDatabaseId 必須指定為源資料庫的資源標識碼。

次要:建立資料庫做為現有資料庫的次要複本。 sourceDatabaseId 必須指定為現有主資料庫的資源標識碼。

PointInTimeRestore:藉由還原現有資料庫的時間點備份來建立資料庫。 sourceDatabaseId 必須指定為現有資料庫的資源標識符,而且必須指定 restorePointInTime。

復原:藉由還原異地復寫備份來建立資料庫。 sourceDatabaseId 必須指定為可復原的資料庫資源標識碼,才能還原。

還原:藉由還原已刪除資料庫的備份來建立資料庫。 必須指定sourceDatabaseId。 如果 sourceDatabaseId 是資料庫的原始資源識別碼,則必須指定 sourceDatabaseDeletionDate。 否則,sourceDatabaseId 必須是可還原的卸除資料庫資源標識符,而且會忽略 sourceDatabaseDeletionDate。 restorePointInTime 也可以指定從先前的時間點還原。

RestoreLongTermRetentionBackup:從長期保留保存庫還原來建立資料庫。 recoveryServicesRecoveryPointResourceId 必須指定為恢復點資源標識符。

DataWarehouse 版本不支援 Copy、Secondary 和 RestoreLongTermRetentionBackup。

Database

資料庫資源。

DatabaseIdentity

資源的 Azure Active Directory 身分識別組態。

DatabaseIdentityType

身分識別類型

DatabaseLicenseType

要套用此資料庫的授權類型。 LicenseIncluded如果您需要授權,或BasePrice您有授權且符合 Azure Hybrid Benefit 資格。

DatabaseReadScale

唯讀路由的狀態。 如果啟用,則應用程式意圖在其 連接字串 中設定為唯讀的連線,可能會路由傳送至相同區域中的唯讀次要複本。 不適用於彈性集區內的超大規模資料庫。

DatabaseStatus

資料庫的狀態。

DatabaseUpdate

資料庫更新資源。

DatabaseUserIdentity

資源的 Azure Active Directory 身分識別設定。

SampleName

建立此資料庫時要套用的範例架構名稱。

SecondaryType

如果資料庫是次要資料庫,則為次要類型。 有效值為 Geo 和 Named。

Sku

ARM 資源 SKU。

BackupStorageRedundancy

用來儲存此資料庫的備份的記憶體帳戶類型。

名稱 類型 Description
Geo

string

GeoZone

string

Local

string

Zone

string

CatalogCollationType

元資料目錄的定序。

名稱 類型 Description
DATABASE_DEFAULT

string

SQL_Latin1_General_CP1_CI_AS

string

CreateMode

指定資料庫建立模式。

默認值:一般資料庫建立。

複製:建立資料庫做為現有資料庫的複本。 sourceDatabaseId 必須指定為源資料庫的資源標識碼。

次要:建立資料庫做為現有資料庫的次要複本。 sourceDatabaseId 必須指定為現有主資料庫的資源標識碼。

PointInTimeRestore:藉由還原現有資料庫的時間點備份來建立資料庫。 sourceDatabaseId 必須指定為現有資料庫的資源標識符,而且必須指定 restorePointInTime。

復原:藉由還原異地復寫備份來建立資料庫。 sourceDatabaseId 必須指定為可復原的資料庫資源標識碼,才能還原。

還原:藉由還原已刪除資料庫的備份來建立資料庫。 必須指定sourceDatabaseId。 如果 sourceDatabaseId 是資料庫的原始資源識別碼,則必須指定 sourceDatabaseDeletionDate。 否則,sourceDatabaseId 必須是可還原的卸除資料庫資源標識符,而且會忽略 sourceDatabaseDeletionDate。 restorePointInTime 也可以指定從先前的時間點還原。

RestoreLongTermRetentionBackup:從長期保留保存庫還原來建立資料庫。 recoveryServicesRecoveryPointResourceId 必須指定為恢復點資源標識符。

DataWarehouse 版本不支援 Copy、Secondary 和 RestoreLongTermRetentionBackup。

名稱 類型 Description
Copy

string

Default

string

OnlineSecondary

string

PointInTimeRestore

string

Recovery

string

Restore

string

RestoreExternalBackup

string

RestoreExternalBackupSecondary

string

RestoreLongTermRetentionBackup

string

Secondary

string

Database

資料庫資源。

名稱 類型 Description
id

string

資源識別碼。

identity

DatabaseIdentity

資料庫的 Azure Active Directory 身分識別。

kind

string

資料庫種類。 這是用於 Azure 入口網站 體驗的元數據。

location

string

資源位置。

managedBy

string

管理資料庫的資源。

name

string

資源名稱。

properties.autoPauseDelay

integer

在幾分鐘后自動暫停資料庫的時間。 值為 -1 表示已停用自動暫停

properties.catalogCollation

CatalogCollationType

元資料目錄的定序。

properties.collation

string

資料庫的定序。

properties.createMode

CreateMode

指定資料庫建立模式。

默認值:一般資料庫建立。

複製:建立資料庫做為現有資料庫的複本。 sourceDatabaseId 必須指定為源資料庫的資源標識碼。

次要:建立資料庫做為現有資料庫的次要複本。 sourceDatabaseId 必須指定為現有主資料庫的資源標識碼。

PointInTimeRestore:藉由還原現有資料庫的時間點備份來建立資料庫。 sourceDatabaseId 必須指定為現有資料庫的資源標識符,而且必須指定 restorePointInTime。

復原:藉由還原異地復寫備份來建立資料庫。 sourceDatabaseId 必須指定為可復原的資料庫資源標識碼,才能還原。

還原:藉由還原已刪除資料庫的備份來建立資料庫。 必須指定sourceDatabaseId。 如果 sourceDatabaseId 是資料庫的原始資源識別碼,則必須指定 sourceDatabaseDeletionDate。 否則,sourceDatabaseId 必須是可還原的已卸除資料庫資源標識符,而且會忽略 sourceDatabaseDeletionDate。 restorePointInTime 也可以指定為從先前的時間點還原。

RestoreLongTermRetentionBackup:從長期保留保存庫還原來建立資料庫。 recoveryServicesRecoveryPointResourceId 必須指定為恢復點資源標識符。

DataWarehouse 版本不支援 Copy、Secondary 和 RestoreLongTermRetentionBackup。

properties.creationDate

string

資料庫 (ISO8601 格式的建立日期) 。

properties.currentBackupStorageRedundancy

BackupStorageRedundancy

用來儲存此資料庫的備份的記憶體帳戶類型。

properties.currentServiceObjectiveName

string

資料庫目前的服務等級目標名稱。

properties.currentSku

Sku

SKU 的名稱和層級。

properties.databaseId

string

資料庫的識別碼。

properties.defaultSecondaryLocation

string

這個資料庫的預設次要區域。

properties.earliestRestoreDate

string

這會記錄此資料庫的最早開始日期和時間, (ISO8601 格式) 。

properties.elasticPoolId

string

包含此資料庫之彈性集區的資源標識碼。

properties.failoverGroupId

string

此資料庫所屬的故障轉移群組資源標識碼。

properties.federatedClientId

string

每個資料庫 CMK 案例用於跨租使用者的用戶端識別碼

properties.highAvailabilityReplicaCount

integer

與用來提供高可用性之資料庫相關聯的次要複本數目。 不適用於彈性集區內的超大規模資料庫。

properties.isInfraEncryptionEnabled

boolean

此資料庫已啟用基礎結構加密。

properties.isLedgerOn

boolean

不論此資料庫是否為總賬資料庫,這表示資料庫中的所有數據表都是總賬數據表。 注意:建立資料庫之後,就無法變更此屬性的值。

properties.licenseType

DatabaseLicenseType

要套用至此資料庫的授權類型。 LicenseIncluded如果您需要授權,或BasePrice如果您有授權且符合 Azure Hybrid Benefit 資格。

properties.longTermRetentionBackupResourceId

string

與此資料庫建立作業相關聯的長期保留備份資源標識符。

properties.maintenanceConfigurationId

string

指派給資料庫的維護組態標識碼。 此組態會定義發生維護更新的期間。

properties.maxLogSizeBytes

integer

這個資料庫的記錄大小上限。

properties.maxSizeBytes

integer

以位元組表示的資料庫大小上限。

properties.minCapacity

number

資料庫一律已配置的最小容量,如果未暫停,則為

properties.pausedDate

string

用戶設定或動作暫停資料庫 (ISO8601 格式) 的日期。 如果資料庫已就緒,則為 Null。

properties.readScale

DatabaseReadScale

唯讀路由的狀態。 如果啟用,將應用程式意圖設定為唯讀的連線 連接字串 可能會路由傳送至相同區域中的唯讀次要複本。 不適用於彈性集區內的超大規模資料庫。

properties.recoverableDatabaseId

string

與這個資料庫建立作業相關聯的可復原資料庫資源標識符。

properties.recoveryServicesRecoveryPointId

string

與此資料庫建立作業相關聯的恢復點資源標識碼。

properties.requestedBackupStorageRedundancy

BackupStorageRedundancy

用來儲存此資料庫的備份的記憶體帳戶類型。

properties.requestedServiceObjectiveName

string

資料庫所要求的服務等級目標名稱。

properties.restorableDroppedDatabaseId

string

與這個資料庫的建立作業相關聯的可還原已卸除資料庫資源標識碼。

properties.restorePointInTime

string

指定將還原以建立新資料庫之源資料庫) (ISO8601 時間點。

properties.resumedDate

string

使用者動作或資料庫登入 (ISO8601 格式) 繼續資料庫的日期。 如果資料庫暫停,則為 Null。

properties.sampleName

SampleName

建立此資料庫時要套用的範例架構名稱。

properties.secondaryType

SecondaryType

如果資料庫是輔助資料庫,則為次要類型。 有效值為 Geo 和 Named。

properties.sourceDatabaseDeletionDate

string

指定刪除資料庫的時間。

properties.sourceDatabaseId

string

與此資料庫建立作業相關聯的源資料庫資源標識符。

properties.sourceResourceId

string

與這個資料庫建立作業相關聯的來源資源標識符。

此屬性僅支援 DataWarehouse 版本,並允許跨訂用帳戶還原。

指定 sourceResourceId 時,sourceDatabaseId、recoverableDatabaseId、restoreableDroppedDatabaseId 和 sourceDatabaseDeletionDate 不得指定,而且 CreateMode 必須是 PointInTimeRestore、Restore 或 Recover。

當 createMode 是 PointInTimeRestore 時,sourceResourceId 必須是現有資料庫或現有 SQL 集區的資源識別碼,而且必須指定 restorePointInTime。

當 createMode 為 Restore 時,sourceResourceId 必須是可還原的已卸除資料庫或可還原的已卸除 SQL 集區的資源識別符。

當 createMode 為 Recover 時,sourceResourceId 必須是可復原資料庫或可復原 SQL 集區的資源標識碼。

當來源訂用帳戶屬於與目標訂用帳戶不同的租使用者時,“x-ms-authorization-auxiliary” 標頭必須包含來源租使用者的驗證令牌。 如需有關 「x-ms-authorization-auxiliary」 標頭的詳細資訊,請參閱 https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant

properties.status

DatabaseStatus

資料庫的狀態。

properties.zoneRedundant

boolean

不論此資料庫是否為區域備援,這表示此資料庫的複本會分散到多個可用性區域。

sku

Sku

資料庫 SKU。

SKU 清單可能會因區域和支援供應項目而異。 若要判斷 SKU (包括 SKU 名稱、層/版本、系列和容量) ,這些 sku 可供您在 Azure 區域中的訂用帳戶使用,請使用 Capabilities_ListByLocation REST API 或下列其中一個命令:

az sql db list-editions -l <location> -o table
Get-AzSqlServerServiceObjective -Location <location>
tags

object

資源標籤。

type

string

資源類型。

DatabaseIdentity

資源的 Azure Active Directory 身分識別組態。

名稱 類型 Description
tenantId

string

Azure Active Directory 租用戶標識符。

type

DatabaseIdentityType

身分識別類型

userAssignedIdentities

<string,  DatabaseUserIdentity>

要使用的使用者指派身分識別的資源標識碼

DatabaseIdentityType

身分識別類型

名稱 類型 Description
None

string

UserAssigned

string

DatabaseLicenseType

要套用此資料庫的授權類型。 LicenseIncluded如果您需要授權,或BasePrice您有授權且符合 Azure Hybrid Benefit 資格。

名稱 類型 Description
BasePrice

string

LicenseIncluded

string

DatabaseReadScale

唯讀路由的狀態。 如果啟用,則應用程式意圖在其 連接字串 中設定為唯讀的連線,可能會路由傳送至相同區域中的唯讀次要複本。 不適用於彈性集區內的超大規模資料庫。

名稱 類型 Description
Disabled

string

Enabled

string

DatabaseStatus

資料庫的狀態。

名稱 類型 Description
AutoClosed

string

Copying

string

Creating

string

Disabled

string

EmergencyMode

string

Inaccessible

string

Offline

string

OfflineChangingDwPerformanceTiers

string

OfflineSecondary

string

Online

string

OnlineChangingDwPerformanceTiers

string

Paused

string

Pausing

string

Recovering

string

RecoveryPending

string

Restoring

string

Resuming

string

Scaling

string

Shutdown

string

Standby

string

Starting

string

Stopped

string

Stopping

string

Suspect

string

DatabaseUpdate

資料庫更新資源。

名稱 類型 Description
identity

DatabaseIdentity

資料庫身分識別

properties.autoPauseDelay

integer

在幾分鐘后自動暫停資料庫的時間。 值為 -1 表示自動暫停已停用

properties.catalogCollation

CatalogCollationType

元資料目錄的定序。

properties.collation

string

資料庫的定序。

properties.createMode

CreateMode

指定資料庫建立模式。

默認值:一般資料庫建立。

複製:建立資料庫做為現有資料庫的複本。 sourceDatabaseId 必須指定為源資料庫的資源標識碼。

次要:建立資料庫做為現有資料庫的次要複本。 sourceDatabaseId 必須指定為現有主資料庫的資源標識碼。

PointInTimeRestore:藉由還原現有資料庫的時間點備份來建立資料庫。 sourceDatabaseId 必須指定為現有資料庫的資源標識符,而且必須指定 restorePointInTime。

復原:藉由還原異地復寫備份來建立資料庫。 sourceDatabaseId 必須指定為可復原的資料庫資源標識碼,才能還原。

還原:藉由還原已刪除資料庫的備份來建立資料庫。 必須指定sourceDatabaseId。 如果 sourceDatabaseId 是資料庫的原始資源識別碼,則必須指定 sourceDatabaseDeletionDate。 否則,sourceDatabaseId 必須是可還原的卸除資料庫資源標識符,而且會忽略 sourceDatabaseDeletionDate。 restorePointInTime 也可以指定從先前的時間點還原。

RestoreLongTermRetentionBackup:從長期保留保存庫還原來建立資料庫。 recoveryServicesRecoveryPointResourceId 必須指定為恢復點資源標識符。

DataWarehouse 版本不支援 Copy、Secondary 和 RestoreLongTermRetentionBackup。

properties.creationDate

string

資料庫 (ISO8601 格式) 的建立日期。

properties.currentBackupStorageRedundancy

BackupStorageRedundancy

用來儲存此資料庫的備份的記憶體帳戶類型。

properties.currentServiceObjectiveName

string

資料庫目前的服務等級目標名稱。

properties.currentSku

Sku

SKU 的名稱和層級。

properties.databaseId

string

資料庫的識別碼。

properties.defaultSecondaryLocation

string

此資料庫的預設次要區域。

properties.earliestRestoreDate

string

這會記錄此資料庫可用的最早開始日期和時間 (ISO8601 格式) 。

properties.elasticPoolId

string

包含此資料庫之彈性集區的資源標識碼。

properties.failoverGroupId

string

此資料庫所屬的故障轉移群組資源標識碼。

properties.federatedClientId

string

每個資料庫 CMK 案例用於跨租使用者的用戶端識別碼

properties.highAvailabilityReplicaCount

integer

與用來提供高可用性之資料庫相關聯的次要複本數目。 不適用於彈性集區內的超大規模資料庫。

properties.isInfraEncryptionEnabled

boolean

此資料庫已啟用基礎結構加密。

properties.isLedgerOn

boolean

不論此資料庫是否為總賬資料庫,這表示資料庫中的所有數據表都是總賬數據表。 注意:建立資料庫之後,無法變更此屬性的值。

properties.licenseType

DatabaseLicenseType

要套用此資料庫的授權類型。 LicenseIncluded如果您需要授權,或BasePrice您有授權且符合 Azure Hybrid Benefit 資格。

properties.longTermRetentionBackupResourceId

string

與此資料庫建立作業相關聯的長期保留備份資源標識符。

properties.maintenanceConfigurationId

string

指派給資料庫的維護組態標識碼。 此組態會定義維護更新發生的期間。

properties.maxLogSizeBytes

integer

此資料庫的記錄大小上限。

properties.maxSizeBytes

integer

以位元組表示的資料庫大小上限。

properties.minCapacity

number

資料庫一律已配置的最小容量,如果未暫停,則為

properties.pausedDate

string

用戶設定或動作暫停資料庫的日期, (ISO8601 格式) 。 如果資料庫已就緒,則為 Null。

properties.readScale

DatabaseReadScale

唯讀路由的狀態。 如果啟用,則應用程式意圖在其 連接字串 中設定為唯讀的連線,可能會路由傳送至相同區域中的唯讀次要複本。 不適用於彈性集區內的超大規模資料庫。

properties.recoverableDatabaseId

string

與此資料庫建立作業相關聯的可復原資料庫資源標識符。

properties.recoveryServicesRecoveryPointId

string

與此資料庫建立作業相關聯的恢復點資源標識碼。

properties.requestedBackupStorageRedundancy

BackupStorageRedundancy

用來儲存此資料庫的備份的記憶體帳戶類型。

properties.requestedServiceObjectiveName

string

資料庫所要求的服務等級目標名稱。

properties.restorableDroppedDatabaseId

string

與這個資料庫的建立作業相關聯的可還原卸除資料庫資源標識符。

properties.restorePointInTime

string

指定將還原以建立新資料庫之源資料庫) 格式 (ISO8601 時間點。

properties.resumedDate

string

使用者動作或資料庫登入 (ISO8601 格式) 繼續資料庫的日期。 如果資料庫已暫停,則為 Null。

properties.sampleName

SampleName

建立此資料庫時要套用的範例架構名稱。

properties.secondaryType

SecondaryType

如果資料庫是次要資料庫,則為次要類型。 有效值為 Geo 和 Named。

properties.sourceDatabaseDeletionDate

string

指定刪除資料庫的時間。

properties.sourceDatabaseId

string

與此資料庫建立作業相關聯的源資料庫資源標識符。

properties.status

DatabaseStatus

資料庫的狀態。

properties.zoneRedundant

boolean

不論此資料庫是否為區域備援,這表示此資料庫的複本將會分散到多個可用性區域。

sku

Sku

SKU 的名稱和層級。

tags

object

資源標籤。

DatabaseUserIdentity

資源的 Azure Active Directory 身分識別設定。

名稱 類型 Description
clientId

string

Azure Active Directory 用戶端標識符。

principalId

string

Azure Active Directory 主體標識符。

SampleName

建立此資料庫時要套用的範例架構名稱。

名稱 類型 Description
AdventureWorksLT

string

WideWorldImportersFull

string

WideWorldImportersStd

string

SecondaryType

如果資料庫是次要資料庫,則為次要類型。 有效值為 Geo 和 Named。

名稱 類型 Description
Geo

string

Named

string

Sku

ARM 資源 SKU。

名稱 類型 Description
capacity

integer

特定 SKU 的容量。

family

string

如果服務有不同的硬體世代,則針對相同的 SKU,則可以在這裡擷取。

name

string

SKU 的名稱,通常是字母 + 編號代碼,例如 P3。

size

string

特定 SKU 的大小

tier

string

特定 SKU 的層級或版本,例如基本、進階。