共用方式為


Managed Databases - Create Or Update

建立新的資料庫或更新現有的資料庫。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}?api-version=2023-08-01

URI 參數

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

string

資料庫的名稱。

managedInstanceName
path True

string

受控實例的名稱。

resourceGroupName
path True

string

包含資源的資源群組名稱。 您可以從 Azure Resource Manager API 或入口網站取得此值。

subscriptionId
path True

string

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

api-version
query True

string

要用於要求的 API 版本。

要求本文

名稱 必要 類型 Description
location True

string

資源位置。

properties.autoCompleteRestore

boolean

是否要自動完成此受控資料庫的還原。

properties.catalogCollation

CatalogCollationType

元資料目錄的定序。

properties.collation

string

受控資料庫的定序。

properties.createMode

ManagedDatabaseCreateMode

受控資料庫建立模式。 PointInTimeRestore:藉由還原現有資料庫的時間點備份來建立資料庫。 必須指定SourceDatabaseName、SourceManagedInstanceName和PointInTime。 RestoreExternalBackup:從外部備份文件還原來建立資料庫。 必須指定 Collation、StorageContainerUri 和 StorageContainerSasToken。 復原:藉由還原異地復寫備份來建立資料庫。 RecoverableDatabaseId 必須指定為要還原的可復原資料庫資源標識符。 RestoreLongTermRetentionBackup:從長期保留備份還原來建立資料庫(需要 longTermRetentionBackupResourceId)。

properties.crossSubscriptionRestorableDroppedDatabaseId

string

建立此資料庫時,可還原的跨訂用帳戶卸除資料庫資源標識符。

properties.crossSubscriptionSourceDatabaseId

string

與此資料庫建立作業相關聯的跨訂用帳戶源資料庫資源標識符。

properties.crossSubscriptionTargetManagedInstanceId

string

目標受控實例標識碼用於跨訂用帳戶還原。

properties.isLedgerOn

boolean

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

properties.lastBackupName

string

還原此受控資料庫的上次備份檔名。

properties.longTermRetentionBackupResourceId

string

要用於還原此受控資料庫之長期保留備份的名稱。

properties.recoverableDatabaseId

string

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

properties.restorableDroppedDatabaseId

string

建立此資料庫時要還原的可還原卸除資料庫資源標識符。

properties.restorePointInTime

string (date-time)

有條件的。 如果 createMode 是 PointInTimeRestore,則需要此值。 指定要還原以建立新資料庫的源資料庫的時間點(ISO8601格式)。

properties.sourceDatabaseId

string

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

properties.storageContainerIdentity

string

有條件的。 如果 createMode 為 RestoreExternalBackup,則會使用此值。 指定用於記憶體容器驗證的身分識別。 可以是 'SharedAccessSignature' 或 'ManagedIdentity';如果未指定 'SharedAccessSignature',則會假設為 。

properties.storageContainerSasToken

string

有條件的。 如果 createMode 為 RestoreExternalBackup 且 storageContainerIdentity 不是 ManagedIdentity,則需要此值。 指定記憶體容器 sas 令牌。

properties.storageContainerUri

string

有條件的。 如果 createMode 為 RestoreExternalBackup,則需要此值。 指定儲存此還原備份之記憶體容器的 URI。

tags

object

資源標籤。

回應

名稱 類型 Description
200 OK

ManagedDatabase

已成功更新資料庫。

201 Created

ManagedDatabase

已成功建立資料庫。

202 Accepted

接受

標題

Location: string

Other Status Codes

ErrorResponse

錯誤回應: ***

  • 400 ManagedInstanceStoppingOrStopped - 實例處於停止/停止狀態時提交的衝突作業

  • 400 ManagedInstanceStarting - 實例處於啟動狀態時提交的衝突作業

  • 400 AkvEndpointNotReachableFromNode - AKV 端點 '{0}' 無法從 SQL 連線,在伺服器 '{1}'。

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

  • 400 PasswordNotComplex - 所提供的密碼不夠複雜。

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

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

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

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

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

  • 400 ManagedDatabaseNameInUse - 資料庫 '{0}' 已經存在。 選擇不同的資料庫名稱。

  • 400 PitrPointInTimeInvalid - 時間點 {0} 無效。 有效的時間點範圍從 {1} 天到現在,而不是在來源伺服器建立時間之前。

  • 400 NoMoreSpaceInManagedInstance - 受控實例已達到其記憶體限制。 受控實例的記憶體使用量不能超過 (%d) MB。

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

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

  • 400 StorageAccountFull - 受控實例已達基礎 Azure 儲存器帳戶的總容量。 Azure 進階記憶體帳戶限製為 35TB 的已配置空間。

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

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

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

  • 400 ManagedInstanceStoppingOrStopped - 實例處於停止/停止狀態時提交的衝突作業

  • 400 InvalidBackupRetentionPeriod - {0} 的保留天數不是有效的組態。 有效的備份保留天數必須介於 {1} 和 {2} 之間

  • 400 ManagedInstanceStarting - 實例處於啟動狀態時提交的衝突作業

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

  • 400 DatabaseNumberLimitReached - 達到 SQL Database 受控實例的資料庫數目上限。

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

  • 400 ManagedInstanceUpdateSloInProgress - 「作業無法完成,因為受控實例 』{0}' 的服務層級變更正在進行中。 請等候作業進行中完成,然後再試一次。

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

  • 400 AkvHostNotResolvingFromNode - AKV 主機 '{0}' 無法從 SQL 解析,在伺服器 '{1}'。

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

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

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

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

  • 400 InvalidCrossSubscriptionTargetManagedInstanceId - 無效的跨訂用帳戶目標受控實例標識碼。

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

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

  • 400 MismatchingSubscriptionWithUrl - 提供的訂用帳戶不符合 Url 中的訂用帳戶。

  • 400 MissingCollation - 需要定序。

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

  • 400 MissingRestorePointInTime - 遺漏還原時間點

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

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

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

  • 400 CrossSubscriptionRestorableDroppedDatabaseIdGivenForRestoreWithCrossSubscriptionSourceDatabaseId - 無法在指定 crossSubscriptionRestorableDroppedDatabaseId 時已指定 crossSubscriptionSourceDatabaseId。

  • 400 MissmatchingCrossSubscriptionTargetManagedInstanceIdWithUrl - 提供的 crossSubscriptionTargetManagedInstanceId 必須符合 URL 中的實例。

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

  • 400 InvalidLongTermRetentionManagedInstanceBackupId - 受控實例的長期保留備份標識符無效。

  • 400 LongTermRetentiontBackupOperationResultsInvalidODataQuery - 指定的 OData 查詢無效或不受支援

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

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

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

  • 400 LongTermRetentionMigrationSameServerNotSupported - 不支援 LTR 複製功能來複製相同伺服器內的 LTR 備份。

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

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

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

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

  • 400 LtrOperationFailedBackupImmutable - 刪除長期保留備份失敗,因為備份是不可變的。

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

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

  • 400 LtrRestoreFailedArchiveStorageTier - 不支援還原封存的長期保留備份。 還原只能在解除凍結或定期的長期保留備份上執行。

  • 400 LtrArchiveStorageTierNotEnabled - 未啟用封存長期保留備份。

  • 400 LtrArchiveWrongParameters - Desired (backupStorageAccessTier, operationMode) 組合不支援 ChangeLongTermRetentionBackupAccessTier。 只允許 (封存、移動) 和 (經常性,複製) 。

  • 400 LTRArchiveRedundancyChangeFailed - 當設定具有「封存」備份記憶體存取層的長期保留原則時,不支援將備份記憶體備援類型更新為區域備援記憶體

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

  • 400 ManagementServiceManagedServerDisabled - 作業失敗,因為受控實例 '{0}' 已停用。 請啟用受控實例,然後再試一次。

  • 400 MiGeoRestoreWithWrongBackupStorageRedundancy - Geo-Restore 不允許使用 LRS/ZRS 備份記憶體備援的受控實例。

  • 400 LastBackupNameHasNewline - 請勿在 lastBackupName 中使用禁止字元 ('\n', '\r')。

  • 400 LastBackupNameHasNonAsciiCharacter - 作業已中止,因為 'LastBackupName' 參數包含無效的字元。 只允許 ASCII 字元。

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

  • 400 LRSCutoverDatabaseDoesNotExist - 作業已中止,因為要求中指定的資料庫名稱不符合指定伺服器上的任何資料庫名稱。

  • 400 LRSCutoverDatabaseNotInRestoringState - 作業已中止,因為指定的資料庫未處於還原狀態。

  • 400 LRSCutoverDatabaseAlreadyRestored - 作業已中止,因為指定的資料庫已經還原。

  • 400 LRSCutoverAlreadyInitiated - 作業已中止,因為指定的資料庫的完全移轉已在進行中。

  • 400 ManagementServiceFeatureDisabled - 用戶嘗試使用已停用的功能。

  • 400 AadOnlyAuthenticationIsEnabled - 已啟用 Azure Active Directory 僅驗證。 請連絡您的系統管理員。

  • 400 UpdateingInstanceAndBackupRedundancy - 實例區域備援和備份記憶體備援無法在相同的要求中更新。

  • 400 DeleteOfManagedInstanceIsDisabled - 已停用受控實例的刪除作業。

  • 400 RequestCantLandOnPaaSv2Platform - 要求必須登陸 PaaSv2 平臺,但未啟用 PaaSv2。

  • 400 CustomMaintenanceWindowIsDisabled - 未啟用自定義維護視窗。

  • 400 DeleteOfVersion2VirtualClusterIsDisabled - 未啟用第 2 版的虛擬叢集刪除。

  • 400 DeleteOfVirtualClusterIsDisabled - 未啟用虛擬叢集的刪除。

  • 400 MICantBeMovedFromOrToInstancePool - 現有的受控實例無法移至受控實例集區。

  • 400 DnsRefreshOnVirtualClusterIsDisabled - 未啟用虛擬叢集上的 DNS 記錄重新整理。

  • 400 TimeoutDuringRestore - 嘗試連線到還原目標時發生逾時。

  • 400 AutoCompleteMissingLastBackupName - 自動完成還原要求必須提供 lastBackupName 參數。

  • 400 MissingThumbprint - 找不到伺服器證書。

  • 400 BlobStorageServerFailure - Blob 記憶體伺服器失敗。

  • 400 BackupSetNotFound - 找不到還原資料庫的備份。 請連絡支援人員以還原資料庫。

  • 400 FullBackupNotFound - 找不到完整備份。

  • 400 RestoreFromStripedBackupsNotEnabled - 不支援從等量備份還原。

  • 400 BrokenRestorePlanNoFullBackup - 還原計劃已中斷,因為沒有完整備份。

  • 400 BrokenRestorePlanWrongLogBackupLSN - 還原計劃已中斷,因為目前記錄備份的 firstLsn 未 <= 下一個記錄備份的 lastLsn。

  • 400 BrokenRestorePlanWrongDiffBackupLSN - 還原計劃已中斷,因為 diff 備份的 firstLsn 未 >= full backup 的 firstLsn。

  • 400 BrokenRestorePlanGapInLogBackups - 還原計劃已中斷,因為目前記錄備份的 firstLsn 不等於上一個記錄備份的 lastLsn。

  • 400 TargetServerDoesNotExist - 目標伺服器 {0} 不存在或尚未就緒。 請檢查它是否存在,然後重試還原要求。

  • 400 TargetServerRestoreNotAllowed - 目標伺服器 {0} 目前不是允許啟動還原的狀態。

  • 400 XtpInitializedDuringRestore - 記憶體優化檔案群組必須是空的,才能在 SQL Database 受控實例的一般用途層還原。

  • 400 FullBackupMissingChecksum - 提供的完整備份遺漏總和檢查碼。

  • 400 FullBackupDamaged - 提供的完整備份已損毀。

  • 400 MissingStripeInBackupSet - 提供的備份集有一或多個遺漏的等量。

  • 400 BackupsFromMultipleDatabasesDetectedInTheContainerWhileRestoreInProgress - 容器資料夾中有多個資料庫的備份。 請確定容器資料夾具有來自單一資料庫的備份。{0}

  • 400 BrokenRestorePlanWrongDiffBaseGUID - 還原計劃已中斷,因為差異備份的 DifferentialBaseGuid 不符合完整備份的 BackupSetGuid。

  • 400 CorruptedPagesInBackupSet - 作業已中止,因為 RESTORE 偵測到備份集中的一或多個損毀頁面。

  • 400 ManagedIdentityIssueDetectedWhileRestoreInProgress - 受控識別未正確設定。 請確認並再試一次。

  • 400 CorruptedPagesListMaintenance - 作業已中止,因為處理未進行總和檢查碼的備份時發生內部錯誤。

  • 400 StorageBrokenIssueDetectedWhileInProgress - 記憶體連線已中斷。 自動重試...

  • 400 PartiallyContainedDatabaseUnsupported -「不支援部分自主資料庫的備份」。

  • 400 RequiredBackupIsNotLastRestored - 無法完成移轉,因為提供的備份檔名不是還原的最後一個備份文件的名稱。

  • 400 ManagedInstanceStorageLimitHit - 受控實例已達到其記憶體限制。

  • 400 不相容的PhysicalLayoutTooFewDataFiles - 資料庫備份包含不相容的實體配置。 備份中找不到任何數據檔。

  • 400 不相容的PhysicalLayoutNonOnlineDataFilesExist - 資料庫備份包含不相容的實體配置。 非在線數據檔存在。

  • 400 IncompatiblePhysicalLayoutWrongNumberOfLogFiles - 資料庫備份包含不相容的實體配置。 不支援多個記錄檔。

  • 400 不相容的PhysicalLayoutNonOnlineLogFilesExist - 資料庫備份包含不相容的實體配置。 非在線記錄檔存在。

  • 400 IncompatiblePhysicalLayoutTooManyNonDataLogFiles - 資料庫備份包含不相容的實體配置。 太多非數據/記錄檔。

  • 400 ExternalBackupAlreadySignaledToComplete - 還原要求已發出完成的訊號。

  • 400 ExternalBackupRestoreHasNotBeenStarted - 還原要求只能在還原啟動之後完成。

  • 400 ExternalBackupUpgradeInProgress - 還原要求無法完成,因為升級正在進行中。

  • 400 不相容的PhysicalLayoutTooManyXTPFiles - 資料庫備份包含不相容的實體配置。 在包含MEMORY_OPTIMIZED_DATA的檔案群組中找到多個檔案。

  • 400 BlobStorageFailure - Blob 記憶體失敗。

  • 400 BackupsFromMultipleDatabasesDetectedInTheContainerFromTheStart - 容器資料夾中有多個資料庫的備份。 請確定容器資料夾具有來自單一資料庫的備份。{0}

  • 400 ManagedIdentityIssueDetectedFromTheStart - 受控識別未正確設定。 請確認並再試一次。

  • 400 StorageBrokenIssueDetectedAtTheStart - 儲存器連線中斷。 請確認並再試一次。

  • 400 StorageBrokenIssueDetectedTerminateRetries - 記憶體連線仍然中斷。 請確認並再試一次。

  • 400 BackupSetBroken - 備份集已中斷。

  • 400 SqlRestoreError - 還原備份時發生無法重試的錯誤。

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

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

  • 404 ResourceNotFound - 找不到要求的資源。

  • 404 CannotFindServerCertificateWithThumbprint - 找不到指紋為 '{0}'的伺服器證書。 請使用 PowerShell Cmdlet 'Add-AzureRmSqlManagedInstanceTransparentDataEncryptionCertificate' 來建立憑證。

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

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

  • 404 RestoreSourceDatabaseNotFound - 找不到可以還原的資料庫 '{0}'{1}'。

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

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

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

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

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

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

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

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

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

  • 409 ManagementServiceDatabaseBusy - 資料庫 '{0}' 正忙於另一個作業。 請稍後試用您的作業。

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

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

  • 409 MiCreateFailedNonDelegatedSubnet - 使用者嘗試在未委派給 Microsoft.Sql/managedInstances 的子網中部署受控實例或受控實例集區。

  • 409 InstancePoolBusy - 實例集區正忙於另一個進行中的作業

  • 409 ConflictingManagedInstanceOperation - 受控實例目前正在進行作業。

  • 409 BackupRedundancyUpdateAndInstanceRedundancyConflict - 實例是多重 az,但備份記憶體會從區域備援更新為非區域備援。

  • 409 InstanceRedundancyUpdateWhileBackupRedundancyUpdateInProgress - 無法更新實例備援,因為備份記憶體備援更新正在進行中。

  • 409 InstanceRedundancyUpdateAndBackupRedundancyConflict - 備份記憶體是非區域備援,但實例備援正在更新為區域備援。

  • 409 BackupRedundancyUpdateConflict - 無法更新備份記憶體備援,因為備份記憶體備援更新正在進行中。

  • 409 MiDropFailedOnAuthLocks - 用戶嘗試卸除已在資源上套用鎖定的子網中最後一個受控實例。

  • 409 CannotCancelOperation - 管理作業處於無法取消的狀態。

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

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

  • 412 InstanceNotReadyForBackupRedundancyUpdate - 無法更新備份記憶體備援,因為實例尚未就緒。

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

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

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

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

  • 429 ConflictingSubscriptionOperation - 訂用帳戶目前正在進行作業。

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

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

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

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

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

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

  • 500 LongTermRetentionMigrationRestoreVerFailed - 還原驗證失敗。

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

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

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

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

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

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

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

範例

Creates a new managed database by restoring from an external backup
Creates a new managed database by restoring from an external backup using managed identity
Creates a new managed database from restoring a geo-replicated backup
Creates a new managed database from restoring a long term retention backup
Creates a new managed database using cross subscription point in time restore
Creates a new managed database using point in time restore
Creates a new managed database with ledger on.
Creates a new managed database with maximal properties
Creates a new managed database with minimal properties

Creates a new managed database by restoring from an external backup

範例要求

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/managedDatabase?api-version=2023-08-01

{
  "properties": {
    "createMode": "RestoreExternalBackup",
    "storageContainerUri": "https://myaccountname.blob.core.windows.net/backups",
    "storageContainerSasToken": "sv=2015-12-11&sr=c&sp=rl&sig=1234",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "autoCompleteRestore": true,
    "lastBackupName": "last_backup_name"
  },
  "location": "southeastasia"
}

範例回覆

{
  "tags": {
    "tagKey1": "TagValue1"
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1",
  "name": "testdb1",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "status": "Online",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false
  },
  "type": "Microsoft.Sql/managedInstances/databases"
}
{
  "tags": {
    "tagKey1": "TagValue1"
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2",
  "name": "testdb2",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "status": "Online",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false
  },
  "type": "Microsoft.Sql/managedInstances/databases"
}

Creates a new managed database by restoring from an external backup using managed identity

範例要求

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/managedDatabase?api-version=2023-08-01

{
  "properties": {
    "createMode": "RestoreExternalBackup",
    "storageContainerUri": "https://myaccountname.blob.core.windows.net/backups",
    "storageContainerIdentity": "ManagedIdentity",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "autoCompleteRestore": true,
    "lastBackupName": "last_backup_name"
  },
  "location": "southeastasia"
}

範例回覆

{
  "tags": {
    "tagKey1": "TagValue1"
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1",
  "name": "testdb1",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "status": "Online",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false
  },
  "type": "Microsoft.Sql/managedInstances/databases"
}
{
  "tags": {
    "tagKey1": "TagValue1"
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2",
  "name": "testdb2",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "status": "Online",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false
  },
  "type": "Microsoft.Sql/managedInstances/databases"
}

Creates a new managed database from restoring a geo-replicated backup

範例要求

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/server1/databases/testdb_recovered?api-version=2023-08-01

{
  "location": "southeastasia",
  "properties": {
    "createMode": "Recovery",
    "recoverableDatabaseId": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/Default-SQL-WestEurope/providers/Microsoft.Sql/managedInstances/testsvr/recoverableDatabases/testdb"
  }
}

範例回覆

{
  "tags": {
    "tagKey1": "TagValue1"
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/server1/recoverableDatabases/testdb_recovered",
  "name": "testdb_recovered",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "status": "Online",
    "creationDate": "2018-11-07T04:41:33.937Z",
    "isLedgerOn": false
  },
  "type": "Microsoft.Sql/managedInstances/databases"
}
{
  "tags": {
    "tagKey1": "TagValue1"
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/recoverableDatabases/testdb_recovered",
  "name": "testdb_recovered",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "status": "Online",
    "creationDate": "2018-11-07T04:41:33.937Z",
    "isLedgerOn": false
  },
  "type": "Microsoft.Sql/managedInstances/databases"
}

Creates a new managed database from restoring a long term retention backup

範例要求

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/managedDatabase?api-version=2023-08-01

{
  "properties": {
    "createMode": "RestoreExternalBackup",
    "storageContainerUri": "https://myaccountname.blob.core.windows.net/backups",
    "storageContainerSasToken": "sv=2015-12-11&sr=c&sp=rl&sig=1234",
    "collation": "SQL_Latin1_General_CP1_CI_AS"
  },
  "location": "southeastasia"
}

範例回覆

{
  "tags": {
    "tagKey1": "TagValue1"
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1",
  "name": "testdb1",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "status": "Online",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false
  },
  "type": "Microsoft.Sql/managedInstances/databases"
}
{
  "tags": {
    "tagKey1": "TagValue1"
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2",
  "name": "testdb2",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "status": "Online",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false
  },
  "type": "Microsoft.Sql/managedInstances/databases"
}

Creates a new managed database using cross subscription point in time restore

範例要求

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/managedDatabase?api-version=2023-08-01

{
  "location": "southeastasia",
  "properties": {
    "createMode": "PointInTimeRestore",
    "crossSubscriptionTargetManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr",
    "crossSubscriptionSourceDatabaseId": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr2/databases/testdb",
    "restorePointInTime": "2017-07-14T05:35:31.503Z"
  }
}

範例回覆

{
  "tags": {
    "tagKey1": "TagValue1"
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1",
  "name": "testdb1",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "status": "Online",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false
  },
  "type": "Microsoft.Sql/managedInstances/databases"
}
{
  "tags": {
    "tagKey1": "TagValue1"
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2",
  "name": "testdb2",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "status": "Online",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false
  },
  "type": "Microsoft.Sql/managedInstances/databases"
}

Creates a new managed database using point in time restore

範例要求

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/managedDatabase?api-version=2023-08-01

{
  "location": "southeastasia",
  "properties": {
    "createMode": "PointInTimeRestore",
    "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb",
    "restorePointInTime": "2017-07-14T05:35:31.503Z"
  }
}

範例回覆

{
  "tags": {
    "tagKey1": "TagValue1"
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1",
  "name": "testdb1",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "status": "Online",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false
  },
  "type": "Microsoft.Sql/managedInstances/databases"
}
{
  "tags": {
    "tagKey1": "TagValue1"
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2",
  "name": "testdb2",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "status": "Online",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false
  },
  "type": "Microsoft.Sql/managedInstances/databases"
}

Creates a new managed database with ledger on.

範例要求

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/managedDatabase?api-version=2023-08-01

{
  "location": "southeastasia",
  "properties": {
    "isLedgerOn": true
  }
}

範例回覆

{
  "tags": {
    "tagKey1": "TagValue1"
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb1",
  "name": "testdb1",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "status": "Online",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": true
  },
  "type": "Microsoft.Sql/managedInstances/databases"
}
{
  "tags": {
    "tagKey1": "TagValue1"
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb2",
  "name": "testdb2",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "status": "Online",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": true
  },
  "type": "Microsoft.Sql/managedInstances/databases"
}
Location: https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2022-08-01

Creates a new managed database with maximal properties

範例要求

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/managedDatabase?api-version=2023-08-01

{
  "tags": {
    "tagKey1": "TagValue1"
  },
  "location": "southeastasia"
}

範例回覆

{
  "tags": {
    "tagKey1": "TagValue1"
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1",
  "name": "testdb1",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "status": "Online",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false
  },
  "type": "Microsoft.Sql/managedInstances/databases"
}
{
  "tags": {
    "tagKey1": "TagValue1"
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2",
  "name": "testdb2",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "status": "Online",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false
  },
  "type": "Microsoft.Sql/managedInstances/databases"
}
Location: https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2017-03-01

Creates a new managed database with minimal properties

範例要求

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/managedDatabase?api-version=2023-08-01

{
  "location": "southeastasia"
}

範例回覆

{
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1",
  "name": "testdb1",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "status": "Online",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false
  },
  "type": "Microsoft.Sql/managedInstances/databases"
}
{
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2",
  "name": "testdb2",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "status": "Online",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false
  },
  "type": "Microsoft.Sql/managedInstances/databases"
}
Location: https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2017-03-01

定義

名稱 Description
CatalogCollationType

元資料目錄的定序。

ErrorAdditionalInfo

資源管理錯誤其他資訊。

ErrorDetail

錯誤詳細數據。

ErrorResponse

錯誤回應

ManagedDatabase

受控資料庫資源。

ManagedDatabaseCreateMode

受控資料庫建立模式。 PointInTimeRestore:藉由還原現有資料庫的時間點備份來建立資料庫。 必須指定SourceDatabaseName、SourceManagedInstanceName和PointInTime。 RestoreExternalBackup:從外部備份文件還原來建立資料庫。 必須指定 Collation、StorageContainerUri 和 StorageContainerSasToken。 復原:藉由還原異地復寫備份來建立資料庫。 RecoverableDatabaseId 必須指定為要還原的可復原資料庫資源標識符。 RestoreLongTermRetentionBackup:從長期保留備份還原來建立資料庫(需要 longTermRetentionBackupResourceId)。

ManagedDatabaseStatus

資料庫的狀態。

CatalogCollationType

元資料目錄的定序。

Description
DATABASE_DEFAULT
SQL_Latin1_General_CP1_CI_AS

ErrorAdditionalInfo

資源管理錯誤其他資訊。

名稱 類型 Description
info

object

其他資訊。

type

string

其他信息類型。

ErrorDetail

錯誤詳細數據。

名稱 類型 Description
additionalInfo

ErrorAdditionalInfo[]

錯誤其他資訊。

code

string

錯誤碼。

details

ErrorDetail[]

錯誤詳細數據。

message

string

錯誤訊息。

target

string

錯誤目標。

ErrorResponse

錯誤回應

名稱 類型 Description
error

ErrorDetail

error 物件。

ManagedDatabase

受控資料庫資源。

名稱 類型 Description
id

string

資源標識碼。

location

string

資源位置。

name

string

資源名稱。

properties.autoCompleteRestore

boolean

是否要自動完成此受控資料庫的還原。

properties.catalogCollation

CatalogCollationType

元資料目錄的定序。

properties.collation

string

受控資料庫的定序。

properties.createMode

ManagedDatabaseCreateMode

受控資料庫建立模式。 PointInTimeRestore:藉由還原現有資料庫的時間點備份來建立資料庫。 必須指定SourceDatabaseName、SourceManagedInstanceName和PointInTime。 RestoreExternalBackup:從外部備份文件還原來建立資料庫。 必須指定 Collation、StorageContainerUri 和 StorageContainerSasToken。 復原:藉由還原異地復寫備份來建立資料庫。 RecoverableDatabaseId 必須指定為要還原的可復原資料庫資源標識符。 RestoreLongTermRetentionBackup:從長期保留備份還原來建立資料庫(需要 longTermRetentionBackupResourceId)。

properties.creationDate

string (date-time)

資料庫的建立日期。

properties.crossSubscriptionRestorableDroppedDatabaseId

string

建立此資料庫時,可還原的跨訂用帳戶卸除資料庫資源標識符。

properties.crossSubscriptionSourceDatabaseId

string

與此資料庫建立作業相關聯的跨訂用帳戶源資料庫資源標識符。

properties.crossSubscriptionTargetManagedInstanceId

string

目標受控實例標識碼用於跨訂用帳戶還原。

properties.defaultSecondaryLocation

string

地理配對區域。

properties.earliestRestorePoint

string (date-time)

最早的還原時間點進行時間點還原。

properties.failoverGroupId

string

此受控資料庫所屬的實例故障轉移群組資源標識符。

properties.isLedgerOn

boolean

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

properties.lastBackupName

string

還原此受控資料庫的上次備份檔名。

properties.longTermRetentionBackupResourceId

string

要用於還原此受控資料庫之長期保留備份的名稱。

properties.recoverableDatabaseId

string

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

properties.restorableDroppedDatabaseId

string

建立此資料庫時要還原的可還原卸除資料庫資源標識符。

properties.restorePointInTime

string (date-time)

有條件的。 如果 createMode 是 PointInTimeRestore,則需要此值。 指定要還原以建立新資料庫的源資料庫的時間點(ISO8601格式)。

properties.sourceDatabaseId

string

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

properties.status

ManagedDatabaseStatus

資料庫的狀態。

properties.storageContainerIdentity

string

有條件的。 如果 createMode 為 RestoreExternalBackup,則會使用此值。 指定用於記憶體容器驗證的身分識別。 可以是 'SharedAccessSignature' 或 'ManagedIdentity';如果未指定 'SharedAccessSignature',則會假設為 。

properties.storageContainerSasToken

string

有條件的。 如果 createMode 為 RestoreExternalBackup 且 storageContainerIdentity 不是 ManagedIdentity,則需要此值。 指定記憶體容器 sas 令牌。

properties.storageContainerUri

string

有條件的。 如果 createMode 為 RestoreExternalBackup,則需要此值。 指定儲存此還原備份之記憶體容器的 URI。

tags

object

資源標籤。

type

string

資源類型。

ManagedDatabaseCreateMode

受控資料庫建立模式。 PointInTimeRestore:藉由還原現有資料庫的時間點備份來建立資料庫。 必須指定SourceDatabaseName、SourceManagedInstanceName和PointInTime。 RestoreExternalBackup:從外部備份文件還原來建立資料庫。 必須指定 Collation、StorageContainerUri 和 StorageContainerSasToken。 復原:藉由還原異地復寫備份來建立資料庫。 RecoverableDatabaseId 必須指定為要還原的可復原資料庫資源標識符。 RestoreLongTermRetentionBackup:從長期保留備份還原來建立資料庫(需要 longTermRetentionBackupResourceId)。

Description
Default
PointInTimeRestore
Recovery
RestoreExternalBackup
RestoreLongTermRetentionBackup

ManagedDatabaseStatus

資料庫的狀態。

Description
Creating
DbCopying
DbMoving
Inaccessible
Offline
Online
Restoring
Shutdown
Starting
Stopped
Stopping
Updating