Managed Databases - Get

取得受控資料庫。

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

URI 參數

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

string

資料庫的名稱。

managedInstanceName
path True

string

受管理的執行個體名稱。

resourceGroupName
path True

string

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

subscriptionId
path True

string

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

api-version
query True

string

要用於要求的 API 版本。

回應

名稱 類型 Description
200 OK

ManagedDatabase

已成功擷取指定的受控資料庫。

Other Status Codes

錯誤回應: ≦

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

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

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

範例

Gets a managed database

Sample Request

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/managedInstance/databases/managedDatabase?api-version=2021-11-01

Sample Response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb1",
  "location": "southeastasia",
  "name": "testdb1",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-08-04T15:00:17.73Z",
    "defaultSecondaryLocation": "North Europe",
    "status": "Online"
  },
  "type": "Microsoft.Sql/managedInstances/databases"
}

定義

名稱 Description
CatalogCollationType

元資料目錄的定序。

ManagedDatabase

受控資料庫資源。

ManagedDatabaseCreateMode

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

ManagedDatabaseStatus

資料庫的狀態。

CatalogCollationType

元資料目錄的定序。

名稱 類型 Description
DATABASE_DEFAULT

string

SQL_Latin1_General_CP1_CI_AS

string

ManagedDatabase

受控資料庫資源。

名稱 類型 Description
id

string

資源識別碼。

location

string

資源位置。

name

string

資源名稱。

properties.autoCompleteRestore

boolean

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

properties.catalogCollation

CatalogCollationType

元資料目錄的定序。

properties.collation

string

Managed 資料庫的定序。

properties.createMode

ManagedDatabaseCreateMode

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

properties.creationDate

string

資料庫的建立日期。

properties.defaultSecondaryLocation

string

地理配對區域。

properties.earliestRestorePoint

string

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

properties.failoverGroupId

string

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

properties.lastBackupName

string

還原此受控資料庫的最後一個備份檔名。

properties.longTermRetentionBackupResourceId

string

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

properties.recoverableDatabaseId

string

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

properties.restorableDroppedDatabaseId

string

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

properties.restorePointInTime

string

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

properties.sourceDatabaseId

string

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

properties.status

ManagedDatabaseStatus

資料庫的狀態。

properties.storageContainerSasToken

string

條件。 如果 createMode 為 RestoreExternalBackup,則需要此值。 指定記憶體容器 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

string

PointInTimeRestore

string

Recovery

string

RestoreExternalBackup

string

RestoreLongTermRetentionBackup

string

ManagedDatabaseStatus

資料庫的狀態。

名稱 類型 Description
Creating

string

Inaccessible

string

Offline

string

Online

string

Restoring

string

Shutdown

string

Updating

string