Databases - Create Or Update
建立新的資料庫或更新現有資料庫。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}?api-version=2021-11-01
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
database
|
path | True |
string |
資料庫的名稱。 |
resource
|
path | True |
string |
包含資源的資源群組名稱。 您可以從 Azure 資源管理員 API 或入口網站取得這個值。 |
server
|
path | True |
string |
伺服器的名稱。 |
subscription
|
path | True |
string |
可識別 Azure 訂用帳戶的訂用帳戶識別碼。 |
api-version
|
query | True |
string |
要用於要求的 API 版本。 |
要求本文
名稱 | 必要 | 類型 | Description |
---|---|---|---|
location | True |
string |
資源位置。 |
identity |
資料庫的 Azure Active Directory 身分識別。 |
||
properties.autoPauseDelay |
integer |
在幾分鐘后自動暫停資料庫的時間。 值為 -1 表示已停用自動暫停 |
|
properties.catalogCollation |
元資料目錄的定序。 |
||
properties.collation |
string |
資料庫的定序。 |
|
properties.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 |
要套用至此資料庫的授權類型。
|
||
properties.longTermRetentionBackupResourceId |
string |
與此資料庫建立作業相關聯的長期保留備份資源標識符。 |
|
properties.maintenanceConfigurationId |
string |
指派給資料庫的維護組態標識碼。 此組態會定義發生維護更新的期間。 |
|
properties.maxSizeBytes |
integer |
以位元組表示的資料庫大小上限。 |
|
properties.minCapacity |
number |
資料庫一律已配置的最小容量,如果未暫停,則為 |
|
properties.readScale |
唯讀路由的狀態。 如果啟用,將應用程式意圖設定為唯讀的連線 連接字串 可能會路由傳送至相同區域中的唯讀次要複本。 不適用於彈性集區內的超大規模資料庫。 |
||
properties.recoverableDatabaseId |
string |
與這個資料庫建立作業相關聯的可復原資料庫資源標識符。 |
|
properties.recoveryServicesRecoveryPointId |
string |
與此資料庫建立作業相關聯的恢復點資源標識碼。 |
|
properties.requestedBackupStorageRedundancy |
用來儲存此資料庫的備份的記憶體帳戶類型。 |
||
properties.restorableDroppedDatabaseId |
string |
與這個資料庫的建立作業相關聯的可還原已卸除資料庫資源標識碼。 |
|
properties.restorePointInTime |
string |
指定將還原以建立新資料庫之源資料庫) (ISO8601 時間點。 |
|
properties.sampleName |
建立此資料庫時要套用的範例架構名稱。 |
||
properties.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.zoneRedundant |
boolean |
不論此資料庫是否為區域備援,這表示此資料庫的複本會分散到多個可用性區域。 |
|
sku |
資料庫 SKU。 SKU 清單可能會因區域和支援供應項目而異。 若要判斷 SKU (包括 SKU 名稱、層/版本、系列和容量) ,這些 sku 可供您在 Azure 區域中的訂用帳戶使用,請使用
|
||
tags |
object |
資源標籤。 |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
已成功更新資料庫。 |
|
201 Created |
已成功建立資料庫。 |
|
202 Accepted |
正在建立或更新資料庫。 |
|
Other Status Codes |
錯誤回應: ≦
|
範例
Creates a data warehouse database as a cross-subscription restore from a backup of a dropped database.
範例要求
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdw?api-version=2021-11-01
{
"location": "southeastasia",
"properties": {
"createMode": "Restore",
"sourceResourceId": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/srcsvr/restorableDroppedDatabases/srcdw,131403269876900000"
}
}
範例回覆
{
"sku": {
"name": "DataWarehouse",
"tier": "DataWarehouse",
"capacity": 9000
},
"kind": "v12.0,user,datawarehouse,gen2",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 263882790666240,
"status": "Online",
"databaseId": "188784c9-d602-4684-86cf-e67b6f03551a",
"creationDate": "2022-01-24T06:46:14.99Z",
"currentServiceObjectiveName": "DW1000c",
"requestedServiceObjectiveName": "DW1000c",
"defaultSecondaryLocation": "eastus",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"readScale": "Disabled",
"currentSku": {
"name": "DataWarehouse",
"tier": "DataWarehouse",
"capacity": 9000
},
"currentBackupStorageRedundancy": "Geo"
},
"location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdw",
"name": "testdw",
"type": "Microsoft.Sql/servers/databases"
}
{
"sku": {
"name": "DataWarehouse",
"tier": "DataWarehouse",
"capacity": 9000
},
"kind": "v12.0,user,datawarehouse,gen2",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 263882790666240,
"status": "Online",
"databaseId": "188784c9-d602-4684-86cf-e67b6f03551a",
"creationDate": "2022-01-24T06:46:14.99Z",
"currentServiceObjectiveName": "DW1000c",
"requestedServiceObjectiveName": "DW1000c",
"defaultSecondaryLocation": "eastus",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"readScale": "Disabled",
"currentSku": {
"name": "DataWarehouse",
"tier": "DataWarehouse",
"capacity": 9000
},
"currentBackupStorageRedundancy": "Geo"
},
"location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdw",
"name": "testdw",
"type": "Microsoft.Sql/servers/databases"
}
Creates a data warehouse database as a cross-subscription restore from a geo-backup.
範例要求
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-WestUS/providers/Microsoft.Sql/servers/testsvr/databases/testdw?api-version=2021-11-01
{
"location": "westus",
"properties": {
"createMode": "Recovery",
"sourceResourceId": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-EastUS/providers/Microsoft.Sql/servers/srcsvr/recoverabledatabases/srcdw"
}
}
範例回覆
{
"sku": {
"name": "DataWarehouse",
"tier": "DataWarehouse",
"capacity": 9000
},
"kind": "v12.0,user,datawarehouse,gen2",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 263882790666240,
"status": "Online",
"databaseId": "188784c9-d602-4684-86cf-e67b6f03551a",
"creationDate": "2022-01-24T06:46:14.99Z",
"currentServiceObjectiveName": "DW1000c",
"requestedServiceObjectiveName": "DW1000c",
"defaultSecondaryLocation": "eastus",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"readScale": "Disabled",
"currentSku": {
"name": "DataWarehouse",
"tier": "DataWarehouse",
"capacity": 9000
},
"currentBackupStorageRedundancy": "Geo"
},
"location": "westus",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-WestUS/providers/Microsoft.Sql/servers/testsvr/databases/testdw",
"name": "testdw",
"type": "Microsoft.Sql/servers/databases"
}
{
"sku": {
"name": "DataWarehouse",
"tier": "DataWarehouse",
"capacity": 9000
},
"kind": "v12.0,user,datawarehouse,gen2",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 263882790666240,
"status": "Online",
"databaseId": "188784c9-d602-4684-86cf-e67b6f03551a",
"creationDate": "2022-01-24T06:46:14.99Z",
"currentServiceObjectiveName": "DW1000c",
"requestedServiceObjectiveName": "DW1000c",
"defaultSecondaryLocation": "eastus",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"readScale": "Disabled",
"currentSku": {
"name": "DataWarehouse",
"tier": "DataWarehouse",
"capacity": 9000
},
"currentBackupStorageRedundancy": "Geo"
},
"location": "westus",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-WestUS/providers/Microsoft.Sql/servers/testsvr/databases/testdw",
"name": "testdw",
"type": "Microsoft.Sql/servers/databases"
}
Creates a data warehouse database as a cross-subscription restore from a restore point of an existing database.
範例要求
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdw?api-version=2021-11-01
{
"location": "southeastasia",
"properties": {
"createMode": "PointInTimeRestore",
"sourceResourceId": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/srcsvr/databases/srcdw",
"restorePointInTime": "2022-01-22T05:35:31.503Z"
}
}
範例回覆
{
"sku": {
"name": "DataWarehouse",
"tier": "DataWarehouse",
"capacity": 9000
},
"kind": "v12.0,user,datawarehouse,gen2",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 263882790666240,
"status": "Online",
"databaseId": "188784c9-d602-4684-86cf-e67b6f03551a",
"creationDate": "2022-01-24T06:46:14.99Z",
"currentServiceObjectiveName": "DW1000c",
"requestedServiceObjectiveName": "DW1000c",
"defaultSecondaryLocation": "eastus",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"readScale": "Disabled",
"currentSku": {
"name": "DataWarehouse",
"tier": "DataWarehouse",
"capacity": 9000
},
"currentBackupStorageRedundancy": "Geo"
},
"location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdw",
"name": "testdw",
"type": "Microsoft.Sql/servers/databases"
}
{
"sku": {
"name": "DataWarehouse",
"tier": "DataWarehouse",
"capacity": 9000
},
"kind": "v12.0,user,datawarehouse,gen2",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 263882790666240,
"status": "Online",
"databaseId": "188784c9-d602-4684-86cf-e67b6f03551a",
"creationDate": "2022-01-24T06:46:14.99Z",
"currentServiceObjectiveName": "DW1000c",
"requestedServiceObjectiveName": "DW1000c",
"defaultSecondaryLocation": "eastus",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"readScale": "Disabled",
"currentSku": {
"name": "DataWarehouse",
"tier": "DataWarehouse",
"capacity": 9000
},
"currentBackupStorageRedundancy": "Geo"
},
"location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdw",
"name": "testdw",
"type": "Microsoft.Sql/servers/databases"
}
Creates a database as a copy.
範例要求
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbcopy?api-version=2021-11-01
{
"location": "southeastasia",
"sku": {
"name": "S0",
"tier": "Standard"
},
"properties": {
"createMode": "Copy",
"sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb"
}
}
範例回覆
{
"sku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"kind": "v12.0,user",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 268435456000,
"status": "Online",
"databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
"currentSku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"creationDate": "2017-06-07T04:41:33.937Z",
"currentBackupStorageRedundancy": "Geo",
"currentServiceObjectiveName": "S0",
"defaultSecondaryLocation": "North Europe",
"earliestRestoreDate": "2017-06-07T04:51:33.937Z",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"readScale": "Disabled",
"requestedBackupStorageRedundancy": "Geo",
"requestedServiceObjectiveName": "S0",
"isLedgerOn": false,
"isInfraEncryptionEnabled": false,
"zoneRedundant": false
},
"location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbcopy",
"name": "dbcopy",
"type": "Microsoft.Sql/servers/databases"
}
{
"sku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"kind": "v12.0,user",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 268435456000,
"status": "Online",
"databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
"currentSku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"creationDate": "2017-06-07T04:41:33.937Z",
"currentBackupStorageRedundancy": "Geo",
"currentServiceObjectiveName": "S0",
"defaultSecondaryLocation": "North Europe",
"earliestRestoreDate": "2017-06-07T04:51:33.937Z",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"readScale": "Disabled",
"requestedBackupStorageRedundancy": "Geo",
"requestedServiceObjectiveName": "S0",
"isLedgerOn": false,
"isInfraEncryptionEnabled": false,
"zoneRedundant": false
},
"location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbcopy",
"name": "dbcopy",
"type": "Microsoft.Sql/servers/databases"
}
Creates a database as an on-line secondary.
範例要求
PUT 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
{
"location": "southeastasia",
"sku": {
"name": "S0",
"tier": "Standard"
},
"properties": {
"createMode": "Secondary",
"secondaryType": "Geo",
"sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-NorthEurope/providers/Microsoft.Sql/servers/testsvr1/databases/testdb"
}
}
範例回覆
{
"sku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"kind": "v12.0,user",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 268435456000,
"status": "Online",
"databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
"currentSku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"creationDate": "2017-06-07T04:41:33.937Z",
"currentBackupStorageRedundancy": "Geo",
"currentServiceObjectiveName": "S0",
"defaultSecondaryLocation": "North Europe",
"earliestRestoreDate": "2017-06-07T04:51:33.937Z",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"readScale": "Disabled",
"requestedBackupStorageRedundancy": "Geo",
"requestedServiceObjectiveName": "S0",
"secondaryType": "Geo",
"isLedgerOn": false,
"isInfraEncryptionEnabled": false,
"zoneRedundant": 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"
}
{
"sku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"kind": "v12.0,user",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 268435456000,
"status": "Online",
"databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
"currentSku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"creationDate": "2017-06-07T04:41:33.937Z",
"currentBackupStorageRedundancy": "Geo",
"currentServiceObjectiveName": "S0",
"defaultSecondaryLocation": "North Europe",
"earliestRestoreDate": "2017-06-07T04:51:33.937Z",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"readScale": "Disabled",
"requestedBackupStorageRedundancy": "Geo",
"requestedServiceObjectiveName": "S0",
"secondaryType": "Geo",
"isLedgerOn": false,
"isInfraEncryptionEnabled": false,
"zoneRedundant": 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"
}
Creates a database as named replica secondary.
範例要求
PUT 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
{
"location": "southeastasia",
"sku": {
"name": "HS_Gen4",
"tier": "Hyperscale",
"capacity": 2
},
"properties": {
"createMode": "Secondary",
"secondaryType": "Named",
"sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-NorthEurope/providers/Microsoft.Sql/servers/testsvr1/databases/primarydb"
}
}
範例回覆
{
"sku": {
"name": "HS_Gen4",
"tier": "Hyperscale",
"family": "Gen4",
"capacity": 2
},
"kind": "v12.0,user,vcore,hyperscale",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": -1,
"status": "Online",
"databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
"currentSku": {
"name": "HS_Gen4",
"tier": "Hyperscale",
"family": "Gen4",
"capacity": 2
},
"creationDate": "2017-06-07T04:41:33.937Z",
"currentBackupStorageRedundancy": "Geo",
"currentServiceObjectiveName": "HS_Gen4_2",
"defaultSecondaryLocation": "North Europe",
"earliestRestoreDate": "2017-06-07T04:51:33.937Z",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"readScale": "Disabled",
"requestedBackupStorageRedundancy": "Geo",
"requestedServiceObjectiveName": "HS_Gen4_2",
"highAvailabilityReplicaCount": 0,
"licenseType": "LicenseIncluded",
"secondaryType": "Named",
"isLedgerOn": false,
"isInfraEncryptionEnabled": false,
"zoneRedundant": 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"
}
{
"sku": {
"name": "HS_Gen4",
"tier": "Hyperscale",
"family": "Gen4",
"capacity": 2
},
"kind": "v12.0,user,vcore,hyperscale",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": -1,
"status": "Online",
"databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
"currentSku": {
"name": "HS_Gen4",
"tier": "Hyperscale",
"family": "Gen4",
"capacity": 2
},
"creationDate": "2017-06-07T04:41:33.937Z",
"currentBackupStorageRedundancy": "Geo",
"currentServiceObjectiveName": "HS_Gen4_2",
"defaultSecondaryLocation": "North Europe",
"earliestRestoreDate": "2017-06-07T04:51:33.937Z",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"readScale": "Disabled",
"requestedBackupStorageRedundancy": "Geo",
"requestedServiceObjectiveName": "HS_Gen4_2",
"highAvailabilityReplicaCount": 0,
"licenseType": "LicenseIncluded",
"secondaryType": "Named",
"isLedgerOn": false,
"isInfraEncryptionEnabled": false,
"zoneRedundant": 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"
}
Creates a database from PointInTimeRestore.
範例要求
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbpitr?api-version=2021-11-01
{
"location": "southeastasia",
"properties": {
"createMode": "PointInTimeRestore",
"sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SoutheastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
"restorePointInTime": "2020-10-22T05:35:31.503Z"
}
}
範例回覆
{
"sku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"kind": "v12.0,user",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 268435456000,
"status": "Online",
"databaseId": "2463ef48-53e2-4c26-9781-2d7138080bfd",
"creationDate": "2020-10-23T20:31:35.807Z",
"currentServiceObjectiveName": "S0",
"requestedServiceObjectiveName": "S0",
"defaultSecondaryLocation": "SoutheastAsia",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"isInfraEncryptionEnabled": false,
"zoneRedundant": false,
"earliestRestoreDate": "2020-10-23T20:47:37Z",
"readScale": "Disabled",
"currentSku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"currentBackupStorageRedundancy": "Geo",
"requestedBackupStorageRedundancy": "Geo",
"isLedgerOn": false
},
"location": "SoutheastAsia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SoutheastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbpitr",
"name": "dbpitr",
"type": "Microsoft.Sql/servers/databases"
}
{
"sku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"kind": "v12.0,user",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 268435456000,
"status": "Online",
"databaseId": "2463ef48-53e2-4c26-9781-2d7138080bfd",
"creationDate": "2020-10-23T20:31:35.807Z",
"currentServiceObjectiveName": "S0",
"requestedServiceObjectiveName": "S0",
"defaultSecondaryLocation": "SoutheastAsia",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"isInfraEncryptionEnabled": false,
"zoneRedundant": false,
"earliestRestoreDate": "2020-10-23T20:47:37Z",
"readScale": "Disabled",
"currentSku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"currentBackupStorageRedundancy": "Geo",
"requestedBackupStorageRedundancy": "Geo",
"isLedgerOn": false
},
"location": "SoutheastAsia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SoutheastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbpitr",
"name": "dbpitr",
"type": "Microsoft.Sql/servers/databases"
}
Creates a database with default mode.
範例要求
PUT 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
{
"location": "southeastasia",
"sku": {
"name": "S0",
"tier": "Standard"
},
"properties": {
"createMode": "Default",
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 1073741824
}
}
範例回覆
{
"sku": {
"name": "S0",
"tier": "Standard",
"capacity": 10
},
"kind": "v12.0,user",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 1073741824,
"status": "Online",
"currentSku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
"creationDate": "2017-06-07T04:41:33.937Z",
"currentBackupStorageRedundancy": "Geo",
"currentServiceObjectiveName": "S0",
"defaultSecondaryLocation": "North Europe",
"earliestRestoreDate": "2017-06-07T04:51:33.937Z",
"readScale": "Disabled",
"requestedBackupStorageRedundancy": "Geo",
"requestedServiceObjectiveName": "S0",
"isInfraEncryptionEnabled": false,
"zoneRedundant": false,
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"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"
}
{
"sku": {
"name": "S0",
"tier": "Standard",
"capacity": 10
},
"kind": "v12.0,user",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 1073741824,
"status": "Online",
"currentSku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
"creationDate": "2017-06-07T04:41:33.937Z",
"currentBackupStorageRedundancy": "Geo",
"currentServiceObjectiveName": "S0",
"defaultSecondaryLocation": "North Europe",
"earliestRestoreDate": "2017-06-07T04:51:33.937Z",
"readScale": "Disabled",
"requestedBackupStorageRedundancy": "Geo",
"requestedServiceObjectiveName": "S0",
"isInfraEncryptionEnabled": false,
"zoneRedundant": false,
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"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"
}
Creates a database with ledger on.
範例要求
範例回覆
{
"sku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"kind": "v12.0,user",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 268435456000,
"status": "Online",
"databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
"currentSku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"creationDate": "2017-06-07T04:41:33.937Z",
"currentServiceObjectiveName": "S0",
"currentBackupStorageRedundancy": "Geo",
"defaultSecondaryLocation": "North Europe",
"earliestRestoreDate": "2017-06-07T04:51:33.937Z",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"readScale": "Disabled",
"requestedBackupStorageRedundancy": "Geo",
"requestedServiceObjectiveName": "S0",
"zoneRedundant": false,
"isLedgerOn": true
},
"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"
}
{
"sku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"kind": "v12.0,user",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 268435456000,
"status": "Online",
"databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
"currentSku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"creationDate": "2017-06-07T04:41:33.937Z",
"currentBackupStorageRedundancy": "Zone",
"currentServiceObjectiveName": "S0",
"defaultSecondaryLocation": "North Europe",
"earliestRestoreDate": "2017-06-07T04:51:33.937Z",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"readScale": "Disabled",
"requestedBackupStorageRedundancy": "Zone",
"requestedServiceObjectiveName": "S0",
"zoneRedundant": false,
"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"
}
Creates a database with minimum number of parameters.
範例要求
範例回覆
{
"sku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"kind": "v12.0,user",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 268435456000,
"status": "Online",
"databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
"currentSku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"creationDate": "2017-06-07T04:41:33.937Z",
"currentServiceObjectiveName": "S0",
"currentBackupStorageRedundancy": "Geo",
"defaultSecondaryLocation": "North Europe",
"earliestRestoreDate": "2017-06-07T04:51:33.937Z",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"readScale": "Disabled",
"requestedBackupStorageRedundancy": "Geo",
"requestedServiceObjectiveName": "S0",
"isLedgerOn": false,
"isInfraEncryptionEnabled": false,
"zoneRedundant": 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"
}
{
"sku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"kind": "v12.0,user",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 268435456000,
"status": "Online",
"databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
"currentSku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"creationDate": "2017-06-07T04:41:33.937Z",
"currentBackupStorageRedundancy": "Geo",
"currentServiceObjectiveName": "S0",
"defaultSecondaryLocation": "North Europe",
"earliestRestoreDate": "2017-06-07T04:51:33.937Z",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"readScale": "Disabled",
"requestedBackupStorageRedundancy": "Geo",
"requestedServiceObjectiveName": "S0",
"isLedgerOn": false,
"isInfraEncryptionEnabled": false,
"zoneRedundant": 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"
}
Creates a database with preferred maintenance window.
範例要求
PUT 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
{
"location": "southeastasia",
"sku": {
"name": "S2",
"tier": "Standard"
},
"properties": {
"createMode": "Default",
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 1073741824,
"maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1"
}
}
範例回覆
{
"sku": {
"name": "S2",
"tier": "Standard"
},
"kind": "v12.0,user",
"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": "S2",
"defaultSecondaryLocation": "North Europe",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"isInfraEncryptionEnabled": false,
"zoneRedundant": false,
"earliestRestoreDate": "2020-08-29T06:41:18.283Z",
"readScale": "Disabled",
"currentSku": {
"name": "Standard",
"tier": "Standard",
"capacity": 50
},
"currentBackupStorageRedundancy": "Geo",
"requestedBackupStorageRedundancy": "Geo",
"maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1",
"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"
}
{
"sku": {
"name": "S2",
"tier": "Standard"
},
"kind": "v12.0,user",
"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": "S2",
"defaultSecondaryLocation": "North Europe",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"isInfraEncryptionEnabled": false,
"zoneRedundant": false,
"earliestRestoreDate": "2020-08-29T06:41:18.283Z",
"readScale": "Disabled",
"currentSku": {
"name": "Standard",
"tier": "Standard",
"capacity": 50
},
"currentBackupStorageRedundancy": "Geo",
"requestedBackupStorageRedundancy": "Geo",
"maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1",
"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"
}
Creates a database with specified backup storage redundancy.
範例要求
PUT 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
{
"location": "southeastasia",
"properties": {
"requestedBackupStorageRedundancy": "Zone"
}
}
範例回覆
{
"sku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"kind": "v12.0,user",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 268435456000,
"status": "Online",
"databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
"currentSku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"creationDate": "2017-06-07T04:41:33.937Z",
"currentBackupStorageRedundancy": "Zone",
"currentServiceObjectiveName": "S0",
"defaultSecondaryLocation": "North Europe",
"earliestRestoreDate": "2017-06-07T04:51:33.937Z",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"readScale": "Disabled",
"requestedBackupStorageRedundancy": "Zone",
"requestedServiceObjectiveName": "S0",
"isLedgerOn": false,
"isInfraEncryptionEnabled": false,
"zoneRedundant": 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"
}
{
"sku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"kind": "v12.0,user",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 268435456000,
"status": "Online",
"databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
"currentSku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"creationDate": "2017-06-07T04:41:33.937Z",
"currentBackupStorageRedundancy": "Zone",
"currentServiceObjectiveName": "S0",
"defaultSecondaryLocation": "North Europe",
"earliestRestoreDate": "2017-06-07T04:51:33.937Z",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"readScale": "Disabled",
"requestedBackupStorageRedundancy": "Zone",
"requestedServiceObjectiveName": "S0",
"zoneRedundant": false,
"isLedgerOn": false,
"isInfraEncryptionEnabled": 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"
}
Creates a VCore database by specifying service objective name.
範例要求
PUT 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
{
"location": "southeastasia",
"sku": {
"name": "BC",
"family": "Gen4",
"capacity": 2
}
}
範例回覆
{
"sku": {
"name": "BC_Gen4",
"tier": "BusinessCritical",
"family": "Gen4",
"capacity": 2
},
"kind": "v12.0,user",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"earliestRestoreDate": "2017-06-07T04:51:33.937Z",
"maxSizeBytes": 1073741824,
"status": "Online",
"databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
"creationDate": "2017-06-07T04:41:33.937Z",
"currentServiceObjectiveName": "BC_Gen4_2",
"defaultSecondaryLocation": "North Europe",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"licenseType": "LicenseIncluded",
"maxLogSizeBytes": 104857600,
"readScale": "Enabled",
"currentBackupStorageRedundancy": "Geo",
"requestedBackupStorageRedundancy": "Geo",
"isLedgerOn": false,
"isInfraEncryptionEnabled": false,
"zoneRedundant": false,
"currentSku": {
"name": "BC_Gen4",
"tier": "BusinessCritical",
"capacity": 2
}
},
"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"
}
{
"sku": {
"name": "BC_Gen4",
"tier": "BusinessCritical",
"family": "Gen4",
"capacity": 2
},
"kind": "v12.0,user",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"earliestRestoreDate": "2017-06-07T04:51:33.937Z",
"maxSizeBytes": 1073741824,
"status": "Online",
"databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
"creationDate": "2017-06-07T04:41:33.937Z",
"currentServiceObjectiveName": "BC_Gen4_2",
"defaultSecondaryLocation": "North Europe",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"licenseType": "LicenseIncluded",
"maxLogSizeBytes": 104857600,
"readScale": "Enabled",
"currentBackupStorageRedundancy": "Geo",
"requestedBackupStorageRedundancy": "Geo",
"isInfraEncryptionEnabled": false,
"zoneRedundant": false,
"isLedgerOn": false,
"currentSku": {
"name": "BC_Gen4",
"tier": "BusinessCritical",
"capacity": 2
}
},
"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"
}
Creates a VCore database by specifying sku name and capacity.
範例要求
範例回覆
{
"sku": {
"name": "BC_Gen4",
"tier": "BusinessCritical",
"family": "Gen4",
"capacity": 2
},
"kind": "v12.0,user",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"earliestRestoreDate": "2017-06-07T04:51:33.937Z",
"maxSizeBytes": 1073741824,
"status": "Online",
"databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
"creationDate": "2017-06-07T04:41:33.937Z",
"currentServiceObjectiveName": "BC_Gen4_2",
"defaultSecondaryLocation": "North Europe",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"licenseType": "LicenseIncluded",
"maxLogSizeBytes": 104857600,
"readScale": "Enabled",
"currentBackupStorageRedundancy": "Geo",
"requestedBackupStorageRedundancy": "Geo",
"isLedgerOn": false,
"isInfraEncryptionEnabled": false,
"zoneRedundant": false,
"currentSku": {
"name": "BC_Gen4",
"tier": "BusinessCritical",
"capacity": 2
}
},
"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"
}
{
"sku": {
"name": "BC_Gen4",
"tier": "BusinessCritical",
"family": "Gen4",
"capacity": 2
},
"kind": "v12.0,user",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"earliestRestoreDate": "2017-06-07T04:51:33.937Z",
"maxSizeBytes": 1073741824,
"status": "Online",
"databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
"creationDate": "2017-06-07T04:41:33.937Z",
"currentServiceObjectiveName": "BC_Gen4_2",
"defaultSecondaryLocation": "North Europe",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"licenseType": "LicenseIncluded",
"maxLogSizeBytes": 104857600,
"readScale": "Enabled",
"currentBackupStorageRedundancy": "Geo",
"requestedBackupStorageRedundancy": "Geo",
"isLedgerOn": false,
"isInfraEncryptionEnabled": false,
"zoneRedundant": false,
"currentSku": {
"name": "BC_Gen4",
"tier": "BusinessCritical",
"capacity": 2
}
},
"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 |
---|---|
Backup |
用來儲存此資料庫的備份的記憶體帳戶類型。 |
Catalog |
元資料目錄的定序。 |
Create |
指定資料庫建立模式。 默認值:一般資料庫建立。 複製:建立資料庫做為現有資料庫的複本。 sourceDatabaseId 必須指定為源資料庫的資源標識碼。 次要:建立資料庫做為現有資料庫的次要複本。 sourceDatabaseId 必須指定為現有主資料庫的資源標識碼。 PointInTimeRestore:藉由還原現有資料庫的時間點備份來建立資料庫。 sourceDatabaseId 必須指定為現有資料庫的資源標識符,而且必須指定 restorePointInTime。 復原:藉由還原異地復寫備份來建立資料庫。 sourceDatabaseId 必須指定為可復原的資料庫資源標識碼,才能還原。 還原:藉由還原已刪除資料庫的備份來建立資料庫。 必須指定sourceDatabaseId。 如果 sourceDatabaseId 是資料庫的原始資源識別碼,則必須指定 sourceDatabaseDeletionDate。 否則,sourceDatabaseId 必須是可還原的已卸除資料庫資源標識符,而且會忽略 sourceDatabaseDeletionDate。 restorePointInTime 也可以指定為從先前的時間點還原。 RestoreLongTermRetentionBackup:從長期保留保存庫還原來建立資料庫。 recoveryServicesRecoveryPointResourceId 必須指定為恢復點資源標識符。 DataWarehouse 版本不支援 Copy、Secondary 和 RestoreLongTermRetentionBackup。 |
Database |
資料庫資源。 |
Database |
資源的 Azure Active Directory 身分識別設定。 |
Database |
身分識別類型 |
Database |
要套用至此資料庫的授權類型。
|
Database |
唯讀路由的狀態。 如果啟用,將應用程式意圖設定為唯讀的連線 連接字串 可能會路由傳送至相同區域中的唯讀次要複本。 不適用於彈性集區內的超大規模資料庫。 |
Database |
資料庫的狀態。 |
Database |
資源的 Azure Active Directory 身分識別設定。 |
Sample |
建立此資料庫時要套用的範例架構名稱。 |
Secondary |
如果資料庫是輔助資料庫,則為次要類型。 有效值為 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 |
資料庫的 Azure Active Directory 身分識別。 |
|
kind |
string |
資料庫種類。 這是用於 Azure 入口網站 體驗的元數據。 |
location |
string |
資源位置。 |
managedBy |
string |
管理資料庫的資源。 |
name |
string |
資源名稱。 |
properties.autoPauseDelay |
integer |
在幾分鐘后自動暫停資料庫的時間。 值為 -1 表示自動暫停已停用 |
properties.catalogCollation |
元資料目錄的定序。 |
|
properties.collation |
string |
資料庫的定序。 |
properties.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 |
用來儲存此資料庫的備份的記憶體帳戶類型。 |
|
properties.currentServiceObjectiveName |
string |
資料庫目前的服務等級目標名稱。 |
properties.currentSku |
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 |
要套用此資料庫的授權類型。
|
|
properties.longTermRetentionBackupResourceId |
string |
與此資料庫建立作業相關聯的長期保留備份資源標識符。 |
properties.maintenanceConfigurationId |
string |
指派給資料庫的維護組態標識碼。 此組態會定義維護更新發生的期間。 |
properties.maxLogSizeBytes |
integer |
此資料庫的記錄大小上限。 |
properties.maxSizeBytes |
integer |
以位元組表示的資料庫大小上限。 |
properties.minCapacity |
number |
資料庫一律已配置的最小容量,如果未暫停,則為 |
properties.pausedDate |
string |
用戶設定或動作暫停資料庫的日期, (ISO8601 格式) 。 如果資料庫已就緒,則為 Null。 |
properties.readScale |
唯讀路由的狀態。 如果啟用,則應用程式意圖在其 連接字串 中設為唯讀的連線,可能會路由傳送至相同區域中的唯讀次要複本。 不適用於彈性集區內的超大規模資料庫。 |
|
properties.recoverableDatabaseId |
string |
與此資料庫建立作業相關聯的可復原資料庫資源標識符。 |
properties.recoveryServicesRecoveryPointId |
string |
與此資料庫建立作業相關聯的恢復點資源標識碼。 |
properties.requestedBackupStorageRedundancy |
用來儲存此資料庫的備份的記憶體帳戶類型。 |
|
properties.requestedServiceObjectiveName |
string |
資料庫所要求的服務等級目標名稱。 |
properties.restorableDroppedDatabaseId |
string |
與這個資料庫的建立作業相關聯的可還原卸除資料庫資源標識符。 |
properties.restorePointInTime |
string |
指定將還原以建立新資料庫之源資料庫) 格式 (ISO8601 時間點。 |
properties.resumedDate |
string |
使用者動作或資料庫登入 (ISO8601 格式) 繼續資料庫的日期。 如果資料庫已暫停,則為 Null。 |
properties.sampleName |
建立此資料庫時要套用的範例架構名稱。 |
|
properties.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 為 Recovery 時,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 |
資料庫的狀態。 |
|
properties.zoneRedundant |
boolean |
不論此資料庫是否為區域備援,這表示此資料庫的複本將會分散到多個可用性區域。 |
sku |
資料庫 SKU。 SKU 清單可能會因區域和支援供應專案而有所不同。 若要判斷 SKU (包括 SKU 名稱、層/版本、系列和容量) ,這些 SKU 可供您在 Azure 區域中的訂用帳戶使用,請使用
|
|
tags |
object |
資源標籤。 |
type |
string |
資源類型。 |
DatabaseIdentity
資源的 Azure Active Directory 身分識別設定。
名稱 | 類型 | Description |
---|---|---|
tenantId |
string |
Azure Active Directory 租用戶標識符。 |
type |
身分識別類型 |
|
userAssignedIdentities |
<string,
Database |
要使用的使用者指派身分識別的資源標識碼 |
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 |
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 的層級或版本,例如基本、進階。 |