你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
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 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
database
|
path | True |
string |
数据库的名称。 |
resource
|
path | True |
string |
包含该资源的资源组名称。 可以从 Azure 资源管理器 API 或门户获取此值。 |
server
|
path | True |
string |
服务器的名称。 |
subscription
|
path | True |
string |
用于标识 Azure 订阅的订阅 ID。 |
api-version
|
query | True |
string |
要用于请求的 API 版本。 |
请求正文
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
location | True |
string |
资源位置。 |
identity |
数据库的 Azure Active Directory 标识。 |
||
properties.autoPauseDelay |
integer |
数据库自动暂停的时间(分钟)。 值为 -1 表示已禁用自动暂停 |
|
properties.catalogCollation |
元数据目录的排序规则。 |
||
properties.collation |
string |
数据库的排序规则。 |
|
properties.createMode |
指定数据库创建模式。 默认值:常规数据库创建。 复制:将数据库创建为现有数据库的副本。 sourceDatabaseId 必须指定为源数据库的资源 ID。 辅助数据库:将数据库创建为现有数据库的辅助副本 (replica) 。 sourceDatabaseId 必须指定为现有主数据库的资源 ID。 PointInTimeRestore:通过还原现有数据库的时间点备份来创建数据库。 sourceDatabaseId 必须指定为现有数据库的资源 ID,并且必须指定 restorePointInTime。 恢复:通过还原异地复制的备份来创建数据库。 sourceDatabaseId 必须指定为要还原的可恢复数据库资源 ID。 还原:通过还原已删除数据库的备份来创建数据库。 必须指定 sourceDatabaseId。 如果 sourceDatabaseId 是数据库的原始资源 ID,则必须指定 sourceDatabaseDeletionDate。 否则,sourceDatabaseId 必须是可还原的已删除数据库资源 ID,并且 sourceDatabaseDeletionDate 将被忽略。 还可以指定 restorePointInTime 从较早的时间点还原。 RestoreLongTermRetentionBackup:通过从长期保留保管库还原来创建数据库。 recoveryServicesRecoveryPointResourceId 必须指定为恢复点资源 ID。 DataWarehouse 版本不支持 Copy、Secondary 和 RestoreLongTermRetentionBackup。 |
||
properties.elasticPoolId |
string |
包含此数据库的弹性池的资源标识符。 |
|
properties.federatedClientId |
string |
用于跨租户每个数据库 CMK 方案的客户端 ID |
|
properties.highAvailabilityReplicaCount |
integer |
与数据库关联的用于提供高可用性的辅助副本数。 不适用于弹性池中的超大规模数据库。 |
|
properties.isLedgerOn |
boolean |
此数据库是否为账本数据库,这意味着数据库中的所有表都是账本表。 注意:创建数据库后,无法更改此属性的值。 |
|
properties.licenseType |
要为此数据库申请的许可证类型。
|
||
properties.longTermRetentionBackupResourceId |
string |
与此数据库的创建操作关联的长期保留备份的资源标识符。 |
|
properties.maintenanceConfigurationId |
string |
分配给数据库的维护配置 ID。 此配置定义将发生维护更新的时间段。 |
|
properties.maxSizeBytes |
integer |
以字节表示的数据库的最大大小。 |
|
properties.minCapacity |
number |
数据库始终分配的最小容量(如果未暂停) |
|
properties.readScale |
只读路由的状态。 如果启用,则在其连接字符串中将应用程序意向设置为只读的连接可能会路由到同一区域中的只读辅助副本 (replica) 。 不适用于弹性池中的超大规模数据库。 |
||
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 池的资源 ID,并且必须指定 restorePointInTime。 当 createMode 为 Restore 时,sourceResourceId 必须是可还原的已删除数据库或可还原的已删除 sql 池的资源 ID。 当 createMode 为“恢复”时,sourceResourceId 必须是可恢复数据库或可恢复 sql 池的资源 ID。 当源订阅属于与目标订阅不同的租户时,“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 (包括 AZURE 区域中订阅可用的 SKU 名称、层/版本、系列和容量) ,请使用
|
||
tags |
object |
资源标记。 |
响应
名称 | 类型 | 说明 |
---|---|---|
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"
}
定义
名称 | 说明 |
---|---|
Backup |
用于存储此数据库的备份的存储帐户类型。 |
Catalog |
元数据目录的排序规则。 |
Create |
指定数据库创建模式。 默认值:常规数据库创建。 复制:将数据库创建为现有数据库的副本。 sourceDatabaseId 必须指定为源数据库的资源 ID。 辅助数据库:将数据库创建为现有数据库的辅助副本 (replica) 。 sourceDatabaseId 必须指定为现有主数据库的资源 ID。 PointInTimeRestore:通过还原现有数据库的时间点备份来创建数据库。 sourceDatabaseId 必须指定为现有数据库的资源 ID,并且必须指定 restorePointInTime。 恢复:通过还原异地复制的备份来创建数据库。 sourceDatabaseId 必须指定为要还原的可恢复数据库资源 ID。 还原:通过还原已删除数据库的备份来创建数据库。 必须指定 sourceDatabaseId。 如果 sourceDatabaseId 是数据库的原始资源 ID,则必须指定 sourceDatabaseDeletionDate。 否则,sourceDatabaseId 必须是可还原的已删除数据库资源 ID,并且 sourceDatabaseDeletionDate 将被忽略。 还可以指定 restorePointInTime 从较早的时间点还原。 RestoreLongTermRetentionBackup:通过从长期保留保管库还原来创建数据库。 recoveryServicesRecoveryPointResourceId 必须指定为恢复点资源 ID。 DataWarehouse 版本不支持 Copy、Secondary 和 RestoreLongTermRetentionBackup。 |
Database |
数据库资源。 |
Database |
资源的 Azure Active Directory 标识配置。 |
Database |
标识类型 |
Database |
要为此数据库申请的许可证类型。
|
Database |
只读路由的状态。 如果启用,则在其连接字符串中将应用程序意向设置为只读的连接可能会路由到同一区域中的只读辅助副本 (replica) 。 不适用于弹性池中的超大规模数据库。 |
Database |
数据库的状态。 |
Database |
资源的 Azure Active Directory 标识配置。 |
Sample |
创建此数据库时要应用的示例架构的名称。 |
Secondary |
数据库的辅助类型(如果它是辅助数据库)。 有效值为 Geo 和 Named。 |
Sku |
ARM 资源 SKU。 |
BackupStorageRedundancy
用于存储此数据库的备份的存储帐户类型。
名称 | 类型 | 说明 |
---|---|---|
Geo |
string |
|
GeoZone |
string |
|
Local |
string |
|
Zone |
string |
CatalogCollationType
元数据目录的排序规则。
名称 | 类型 | 说明 |
---|---|---|
DATABASE_DEFAULT |
string |
|
SQL_Latin1_General_CP1_CI_AS |
string |
CreateMode
指定数据库创建模式。
默认值:常规数据库创建。
复制:将数据库创建为现有数据库的副本。 sourceDatabaseId 必须指定为源数据库的资源 ID。
辅助数据库:将数据库创建为现有数据库的辅助副本 (replica) 。 sourceDatabaseId 必须指定为现有主数据库的资源 ID。
PointInTimeRestore:通过还原现有数据库的时间点备份来创建数据库。 sourceDatabaseId 必须指定为现有数据库的资源 ID,并且必须指定 restorePointInTime。
恢复:通过还原异地复制的备份来创建数据库。 sourceDatabaseId 必须指定为要还原的可恢复数据库资源 ID。
还原:通过还原已删除数据库的备份来创建数据库。 必须指定 sourceDatabaseId。 如果 sourceDatabaseId 是数据库的原始资源 ID,则必须指定 sourceDatabaseDeletionDate。 否则,sourceDatabaseId 必须是可还原的已删除数据库资源 ID,并且 sourceDatabaseDeletionDate 将被忽略。 还可以指定 restorePointInTime 从较早的时间点还原。
RestoreLongTermRetentionBackup:通过从长期保留保管库还原来创建数据库。 recoveryServicesRecoveryPointResourceId 必须指定为恢复点资源 ID。
DataWarehouse 版本不支持 Copy、Secondary 和 RestoreLongTermRetentionBackup。
名称 | 类型 | 说明 |
---|---|---|
Copy |
string |
|
Default |
string |
|
OnlineSecondary |
string |
|
PointInTimeRestore |
string |
|
Recovery |
string |
|
Restore |
string |
|
RestoreExternalBackup |
string |
|
RestoreExternalBackupSecondary |
string |
|
RestoreLongTermRetentionBackup |
string |
|
Secondary |
string |
Database
数据库资源。
名称 | 类型 | 说明 |
---|---|---|
id |
string |
资源 ID。 |
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 必须指定为源数据库的资源 ID。 辅助数据库:将数据库创建为现有数据库的辅助副本 (replica) 。 sourceDatabaseId 必须指定为现有主数据库的资源 ID。 PointInTimeRestore:通过还原现有数据库的时间点备份来创建数据库。 sourceDatabaseId 必须指定为现有数据库的资源 ID,并且必须指定 restorePointInTime。 恢复:通过还原异地复制的备份来创建数据库。 sourceDatabaseId 必须指定为要还原的可恢复数据库资源 ID。 还原:通过还原已删除数据库的备份来创建数据库。 必须指定 sourceDatabaseId。 如果 sourceDatabaseId 是数据库的原始资源 ID,则必须指定 sourceDatabaseDeletionDate。 否则,sourceDatabaseId 必须是可还原的已删除数据库资源 ID,并且 sourceDatabaseDeletionDate 将被忽略。 还可以指定 restorePointInTime 从较早的时间点还原。 RestoreLongTermRetentionBackup:通过从长期保留保管库还原来创建数据库。 recoveryServicesRecoveryPointResourceId 必须指定为恢复点资源 ID。 DataWarehouse 版本不支持 Copy、Secondary 和 RestoreLongTermRetentionBackup。 |
|
properties.creationDate |
string |
数据库的创建日期 (ISO8601 格式) 。 |
properties.currentBackupStorageRedundancy |
用于存储此数据库的备份的存储帐户类型。 |
|
properties.currentServiceObjectiveName |
string |
数据库的当前服务级别目标名称。 |
properties.currentSku |
SKU 的名称和层。 |
|
properties.databaseId |
string |
数据库的 ID。 |
properties.defaultSecondaryLocation |
string |
此数据库的默认次要区域。 |
properties.earliestRestoreDate |
string |
这会记录可用于此数据库的最早还原日期和时间, (ISO8601 格式) 。 |
properties.elasticPoolId |
string |
包含此数据库的弹性池的资源标识符。 |
properties.failoverGroupId |
string |
此数据库所属的故障转移组资源标识符。 |
properties.federatedClientId |
string |
用于跨租户每个数据库 CMK 方案的客户端 ID |
properties.highAvailabilityReplicaCount |
integer |
与数据库关联的用于提供高可用性的辅助副本数。 不适用于弹性池中的超大规模数据库。 |
properties.isInfraEncryptionEnabled |
boolean |
为此数据库启用了基础结构加密。 |
properties.isLedgerOn |
boolean |
此数据库是否为账本数据库,这意味着数据库中的所有表都是账本表。 注意:创建数据库后,无法更改此属性的值。 |
properties.licenseType |
要为此数据库申请的许可证类型。
|
|
properties.longTermRetentionBackupResourceId |
string |
与此数据库的创建操作关联的长期保留备份的资源标识符。 |
properties.maintenanceConfigurationId |
string |
分配给数据库的维护配置 ID。 此配置定义将发生维护更新的时间段。 |
properties.maxLogSizeBytes |
integer |
此数据库的最大日志大小。 |
properties.maxSizeBytes |
integer |
以字节表示的数据库的最大大小。 |
properties.minCapacity |
number |
数据库始终分配的最小容量(如果未暂停) |
properties.pausedDate |
string |
用户配置或操作暂停数据库的日期 (ISO8601 格式) 。 如果数据库已准备就绪,则为 Null。 |
properties.readScale |
只读路由的状态。 如果启用,则在其连接字符串中将应用程序意向设置为只读的连接可能会路由到同一区域中的只读辅助副本 (replica) 。 不适用于弹性池中的超大规模数据库。 |
|
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 池的资源 ID,并且必须指定 restorePointInTime。 当 createMode 为 Restore 时,sourceResourceId 必须是可还原的已删除数据库或可还原的已删除 sql 池的资源 ID。 当 createMode 为“恢复”时,sourceResourceId 必须是可恢复数据库或可恢复 sql 池的资源 ID。 当源订阅属于与目标订阅不同的租户时,“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 (包括 AZURE 区域中订阅可用的 SKU 名称、层/版本、系列和容量) ,请使用
|
|
tags |
object |
资源标记。 |
type |
string |
资源类型。 |
DatabaseIdentity
资源的 Azure Active Directory 标识配置。
名称 | 类型 | 说明 |
---|---|---|
tenantId |
string |
Azure Active Directory 租户 ID。 |
type |
标识类型 |
|
userAssignedIdentities |
<string,
Database |
要使用的用户分配标识的资源 ID |
DatabaseIdentityType
标识类型
名称 | 类型 | 说明 |
---|---|---|
None |
string |
|
UserAssigned |
string |
DatabaseLicenseType
要为此数据库申请的许可证类型。
LicenseIncluded
如果需要许可证,或者BasePrice
如果你有许可证并且有资格获得Azure 混合权益。
名称 | 类型 | 说明 |
---|---|---|
BasePrice |
string |
|
LicenseIncluded |
string |
DatabaseReadScale
只读路由的状态。 如果启用,则在其连接字符串中将应用程序意向设置为只读的连接可能会路由到同一区域中的只读辅助副本 (replica) 。 不适用于弹性池中的超大规模数据库。
名称 | 类型 | 说明 |
---|---|---|
Disabled |
string |
|
Enabled |
string |
DatabaseStatus
数据库的状态。
名称 | 类型 | 说明 |
---|---|---|
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 标识配置。
名称 | 类型 | 说明 |
---|---|---|
clientId |
string |
Azure Active Directory 客户端 ID。 |
principalId |
string |
Azure Active Directory 主体 ID。 |
SampleName
创建此数据库时要应用的示例架构的名称。
名称 | 类型 | 说明 |
---|---|---|
AdventureWorksLT |
string |
|
WideWorldImportersFull |
string |
|
WideWorldImportersStd |
string |
SecondaryType
数据库的辅助类型(如果它是辅助数据库)。 有效值为 Geo 和 Named。
名称 | 类型 | 说明 |
---|---|---|
Geo |
string |
|
Named |
string |
Sku
ARM 资源 SKU。
名称 | 类型 | 说明 |
---|---|---|
capacity |
integer |
特定 SKU 的容量。 |
family |
string |
如果服务具有不同代系的硬件(对于同一 SKU),则可以在此处进行捕获。 |
name |
string |
SKU 的名称,通常为字母 + 数字代码,例如 P3。 |
size |
string |
特定 SKU 的大小 |
tier |
string |
特定 SKU 的层或版本,例如“基本”、“高级”。 |