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 |
---|---|---|---|---|
database
|
path | True |
string |
資料庫的名稱。 |
managed
|
path | True |
string |
受控實例的名稱。 |
resource
|
path | True |
string |
包含資源的資源群組名稱。 您可以從 Azure Resource Manager API 或入口網站取得此值。 |
subscription
|
path | True |
string |
識別 Azure 訂用帳戶的訂用帳戶標識碼。 |
api-version
|
query | True |
string |
要用於要求的 API 版本。 |
要求本文
名稱 | 必要 | 類型 | Description |
---|---|---|---|
location | True |
string |
資源位置。 |
properties.autoCompleteRestore |
boolean |
是否要自動完成此受控資料庫的還原。 |
|
properties.catalogCollation |
元資料目錄的定序。 |
||
properties.collation |
string |
受控資料庫的定序。 |
|
properties.createMode |
受控資料庫建立模式。 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 |
已成功更新資料庫。 |
|
201 Created |
已成功建立資料庫。 |
|
202 Accepted |
接受 標題 Location: string |
|
Other Status Codes |
錯誤回應: ***
|
範例
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 |
---|---|
Catalog |
元資料目錄的定序。 |
Error |
資源管理錯誤其他資訊。 |
Error |
錯誤詳細數據。 |
Error |
錯誤回應 |
Managed |
受控資料庫資源。 |
Managed |
受控資料庫建立模式。 PointInTimeRestore:藉由還原現有資料庫的時間點備份來建立資料庫。 必須指定SourceDatabaseName、SourceManagedInstanceName和PointInTime。 RestoreExternalBackup:從外部備份文件還原來建立資料庫。 必須指定 Collation、StorageContainerUri 和 StorageContainerSasToken。 復原:藉由還原異地復寫備份來建立資料庫。 RecoverableDatabaseId 必須指定為要還原的可復原資料庫資源標識符。 RestoreLongTermRetentionBackup:從長期保留備份還原來建立資料庫(需要 longTermRetentionBackupResourceId)。 |
Managed |
資料庫的狀態。 |
CatalogCollationType
元資料目錄的定序。
值 | Description |
---|---|
DATABASE_DEFAULT | |
SQL_Latin1_General_CP1_CI_AS |
ErrorAdditionalInfo
資源管理錯誤其他資訊。
名稱 | 類型 | Description |
---|---|---|
info |
object |
其他資訊。 |
type |
string |
其他信息類型。 |
ErrorDetail
錯誤詳細數據。
名稱 | 類型 | Description |
---|---|---|
additionalInfo |
錯誤其他資訊。 |
|
code |
string |
錯誤碼。 |
details |
錯誤詳細數據。 |
|
message |
string |
錯誤訊息。 |
target |
string |
錯誤目標。 |
ErrorResponse
錯誤回應
名稱 | 類型 | Description |
---|---|---|
error |
error 物件。 |
ManagedDatabase
受控資料庫資源。
名稱 | 類型 | Description |
---|---|---|
id |
string |
資源標識碼。 |
location |
string |
資源位置。 |
name |
string |
資源名稱。 |
properties.autoCompleteRestore |
boolean |
是否要自動完成此受控資料庫的還原。 |
properties.catalogCollation |
元資料目錄的定序。 |
|
properties.collation |
string |
受控資料庫的定序。 |
properties.createMode |
受控資料庫建立模式。 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 |
資料庫的狀態。 |
|
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 |