通过


你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Databases - Get

获取数据库。

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}?api-version=2025-01-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}?api-version=2025-01-01&$expand={$expand}&$filter={$filter}

URI 参数

名称 必需 类型 说明
databaseName
path True

string

数据库的名称。

resourceGroupName
path True

string

minLength: 1
maxLength: 90

资源组的名称。 此名称不区分大小写。

serverName
path True

string

服务器的名称。

subscriptionId
path True

string (uuid)

目标订阅的 ID。 该值必须是 UUID。

api-version
query True

string

minLength: 1

用于此作的 API 版本。

$expand
query

string

要包含在响应中的子资源。

$filter
query

string

一个 OData 筛选器表达式,用于筛选集合中的元素。

响应

名称 类型 说明
200 OK

Database

Azure 运营顺利完成。

Other Status Codes

ErrorResponse

意外的错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 Flow.

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

Gets a database configured with Default enclave type.
Gets a database configured with VBS enclave type.
Gets a database with Availability zone specified.
Gets a database with database level keys expanded using versionless keys.
Gets a database with database level keys expanded.
Gets a database.

Gets a database configured with Default enclave type.

示例请求

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb?api-version=2025-01-01

示例响应

{
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
  "kind": "v12.0,user,vcore",
  "location": "southeastasia",
  "properties": {
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "currentBackupStorageRedundancy": "Geo",
    "currentServiceObjectiveName": "BC_Gen5_2",
    "currentSku": {
      "name": "BC_Gen5",
      "capacity": 2,
      "tier": "BusinessCritical"
    },
    "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
    "defaultSecondaryLocation": "North Europe",
    "earliestRestoreDate": "2017-06-07T04:51:33.937Z",
    "isInfraEncryptionEnabled": false,
    "isLedgerOn": false,
    "licenseType": "LicenseIncluded",
    "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1",
    "maxLogSizeBytes": 104857600,
    "maxSizeBytes": 268435456000,
    "preferredEnclaveType": "Default",
    "readScale": "Enabled",
    "requestedBackupStorageRedundancy": "Geo",
    "requestedServiceObjectiveName": "BC_Gen5_2",
    "status": "Online",
    "zoneRedundant": false
  },
  "sku": {
    "name": "BC_Gen5",
    "capacity": 2,
    "tier": "BusinessCritical"
  }
}

Gets a database configured with VBS enclave type.

示例请求

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb?api-version=2025-01-01

示例响应

{
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
  "kind": "v12.0,user,vcore",
  "location": "southeastasia",
  "properties": {
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "currentBackupStorageRedundancy": "Geo",
    "currentServiceObjectiveName": "BC_Gen5_2",
    "currentSku": {
      "name": "BC_Gen5",
      "capacity": 2,
      "tier": "BusinessCritical"
    },
    "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
    "defaultSecondaryLocation": "North Europe",
    "earliestRestoreDate": "2017-06-07T04:51:33.937Z",
    "isInfraEncryptionEnabled": false,
    "isLedgerOn": false,
    "licenseType": "LicenseIncluded",
    "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1",
    "maxLogSizeBytes": 104857600,
    "maxSizeBytes": 268435456000,
    "preferredEnclaveType": "VBS",
    "readScale": "Enabled",
    "requestedBackupStorageRedundancy": "Geo",
    "requestedServiceObjectiveName": "BC_Gen5_2",
    "status": "Online",
    "zoneRedundant": false
  },
  "sku": {
    "name": "BC_Gen5",
    "capacity": 2,
    "tier": "BusinessCritical"
  }
}

Gets a database with Availability zone specified.

示例请求

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb?api-version=2025-01-01

示例响应

{
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
  "kind": "v12.0,user",
  "location": "southeastasia",
  "properties": {
    "availabilityZone": "1",
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "currentBackupStorageRedundancy": "Geo",
    "currentServiceObjectiveName": "S0",
    "currentSku": {
      "name": "Standard",
      "capacity": 10,
      "tier": "Standard"
    },
    "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
    "defaultSecondaryLocation": "North Europe",
    "earliestRestoreDate": "2017-06-07T04:51:33.937Z",
    "isInfraEncryptionEnabled": false,
    "isLedgerOn": false,
    "maxSizeBytes": 1073741824,
    "readScale": "Disabled",
    "requestedBackupStorageRedundancy": "Geo",
    "requestedServiceObjectiveName": "S0",
    "status": "Online",
    "zoneRedundant": false
  },
  "sku": {
    "name": "S0",
    "capacity": 10,
    "tier": "Standard"
  }
}

Gets a database with database level keys expanded using versionless keys.

示例请求

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb?api-version=2025-01-01&$expand=keys

示例响应

{
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
  "kind": "v12.0,user,vcore",
  "location": "southeastasia",
  "properties": {
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "currentBackupStorageRedundancy": "Geo",
    "currentServiceObjectiveName": "BC_Gen5_2",
    "currentSku": {
      "name": "BC_Gen5",
      "capacity": 2,
      "tier": "BusinessCritical"
    },
    "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
    "defaultSecondaryLocation": "North Europe",
    "earliestRestoreDate": "2017-06-07T04:51:33.937Z",
    "encryptionProtector": "https://your-key-vault-name.vault.azure.net/yourKey",
    "isInfraEncryptionEnabled": false,
    "isLedgerOn": false,
    "keys": {
      "https://your-key-vault-name.vault.azure.net/yourKey": {},
      "https://your-key-vault-name.vault.azure.net/yourKey2": {}
    },
    "licenseType": "LicenseIncluded",
    "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1",
    "maxLogSizeBytes": 104857600,
    "maxSizeBytes": 268435456000,
    "readScale": "Enabled",
    "requestedBackupStorageRedundancy": "Geo",
    "requestedServiceObjectiveName": "BC_Gen5_2",
    "status": "Online",
    "zoneRedundant": false
  },
  "sku": {
    "name": "BC_Gen5",
    "capacity": 2,
    "tier": "BusinessCritical"
  }
}

Gets a database with database level keys expanded.

示例请求

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb?api-version=2025-01-01&$expand=keys

示例响应

{
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
  "kind": "v12.0,user,vcore",
  "location": "southeastasia",
  "properties": {
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "currentBackupStorageRedundancy": "Geo",
    "currentServiceObjectiveName": "BC_Gen5_2",
    "currentSku": {
      "name": "BC_Gen5",
      "capacity": 2,
      "tier": "BusinessCritical"
    },
    "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
    "defaultSecondaryLocation": "North Europe",
    "earliestRestoreDate": "2017-06-07T04:51:33.937Z",
    "encryptionProtector": "https://your-key-vault-name.vault.azure.net/yourKey/yourKeyVersion",
    "isInfraEncryptionEnabled": false,
    "isLedgerOn": false,
    "keys": {
      "https://your-key-vault-name.vault.azure.net/yourKey/yourKeyVersion": {},
      "https://your-key-vault-name.vault.azure.net/yourKey2/yourKey2Version": {}
    },
    "licenseType": "LicenseIncluded",
    "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1",
    "maxLogSizeBytes": 104857600,
    "maxSizeBytes": 268435456000,
    "readScale": "Enabled",
    "requestedBackupStorageRedundancy": "Geo",
    "requestedServiceObjectiveName": "BC_Gen5_2",
    "status": "Online",
    "zoneRedundant": false
  },
  "sku": {
    "name": "BC_Gen5",
    "capacity": 2,
    "tier": "BusinessCritical"
  }
}

Gets a database.

示例请求

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb?api-version=2025-01-01

示例响应

{
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
  "kind": "v12.0,user,vcore",
  "location": "southeastasia",
  "properties": {
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "currentBackupStorageRedundancy": "Geo",
    "currentServiceObjectiveName": "BC_Gen5_2",
    "currentSku": {
      "name": "BC_Gen5",
      "capacity": 2,
      "tier": "BusinessCritical"
    },
    "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
    "defaultSecondaryLocation": "North Europe",
    "earliestRestoreDate": "2017-06-07T04:51:33.937Z",
    "isInfraEncryptionEnabled": false,
    "isLedgerOn": false,
    "licenseType": "LicenseIncluded",
    "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1",
    "maxLogSizeBytes": 104857600,
    "maxSizeBytes": 268435456000,
    "readScale": "Enabled",
    "requestedBackupStorageRedundancy": "Geo",
    "requestedServiceObjectiveName": "BC_Gen5_2",
    "status": "Online",
    "zoneRedundant": false
  },
  "sku": {
    "name": "BC_Gen5",
    "capacity": 2,
    "tier": "BusinessCritical"
  }
}

定义

名称 说明
AlwaysEncryptedEnclaveType

在数据库(即默认或 VBS enclave)上请求的 enclave 类型。

AvailabilityZoneType

指定数据库固定到的可用性区域。

BackupStorageRedundancy

用于存储此数据库的备份的存储帐户类型。

CatalogCollationType

元数据目录的排序规则。

createdByType

创建资源的标识的类型。

CreateMode

指定数据库创建模式。

默认值:常规数据库创建。

复制:将数据库创建为现有数据库的副本。 sourceDatabaseId 必须指定为源数据库的资源 ID。

辅助数据库:将数据库创建为现有数据库的次要副本。 sourceDatabaseId 必须指定为现有主数据库的资源 ID。

PointInTimeRestore:通过还原现有数据库的时间点备份来创建数据库。 sourceDatabaseId 必须指定为现有数据库的资源 ID,并且必须指定 restorePointInTime。

恢复:通过还原异地复制的备份来创建数据库。 sourceDatabaseId 必须指定为可恢复的数据库资源 ID 才能还原。

还原:通过还原已删除数据库的备份来创建数据库。 必须指定 sourceDatabaseId。 如果 sourceDatabaseId 是数据库的原始资源 ID,则必须指定 sourceDatabaseDeletionDate。 否则,sourceDatabaseId 必须是可还原删除的数据库资源 ID,并且将忽略 sourceDatabaseDeletionDate。 还可以指定 restorePointInTime,以便从以前的时间点还原。

RestoreLongTermRetentionBackup:通过从长期保留保管库还原来创建数据库。 recoveryServicesRecoveryPointResourceId 必须指定为恢复点资源 ID。

DataWarehouse 版本不支持 Copy、Secondary 和 RestoreLongTermRetentionBackup。

Database

数据库资源。

DatabaseIdentity

Azure Active Directory identity configuration for a resource.

DatabaseIdentityType

标识类型

DatabaseKey

用于静态加密的数据库级密钥。

DatabaseKeyType

数据库密钥类型。 仅支持的值是“AzureKeyVault”。

DatabaseLicenseType

要申请此数据库的许可证类型。 如果你需要执照,LicenseIncluded;如果你有执照并且符合Azure 混合权益资格,则是BasePrice

DatabaseReadScale

只读路由的状态。 如果启用,连接字符串 中应用意图设置为只读的连接可能会被路由到同一区域内的只读次级副本。 不适用于弹性池中的“超大规模”数据库。

DatabaseStatus

数据库的状态。

DatabaseUserIdentity

Azure Active Directory identity configuration for a resource.

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应

FreeLimitExhaustionBehavior

指定免费数据库使用每月免费限制时的行为。

AutoPause:当剩余月份的可用限制用尽时,数据库将自动暂停。

BillForUsage:在耗尽免费限制后,数据库将继续联机,并且将收取任何超额费用。

SampleName

创建此数据库时要应用的示例架构的名称。

SecondaryType

数据库的辅助类型(如果是辅助数据库)。 有效值为 Geo、Named 和 Standby。

Sku

ARM 资源 SKU。

systemData

与创建和上次修改资源相关的元数据。

AlwaysEncryptedEnclaveType

在数据库(即默认或 VBS enclave)上请求的 enclave 类型。

说明
Default

默认

VBS

VBS

AvailabilityZoneType

指定数据库固定到的可用性区域。

说明
NoPreference

无偏好

1

1

2

2

3

3

BackupStorageRedundancy

用于存储此数据库的备份的存储帐户类型。

说明
Geo

地理位置

Local

本地

Zone

区域

GeoZone

GeoZone

CatalogCollationType

元数据目录的排序规则。

说明
DATABASE_DEFAULT

DATABASE_DEFAULT

SQL_Latin1_General_CP1_CI_AS

SQL_Latin1_General_CP1_CI_AS

createdByType

创建资源的标识的类型。

说明
User
Application
ManagedIdentity
Key

CreateMode

指定数据库创建模式。

默认值:常规数据库创建。

复制:将数据库创建为现有数据库的副本。 sourceDatabaseId 必须指定为源数据库的资源 ID。

辅助数据库:将数据库创建为现有数据库的次要副本。 sourceDatabaseId 必须指定为现有主数据库的资源 ID。

PointInTimeRestore:通过还原现有数据库的时间点备份来创建数据库。 sourceDatabaseId 必须指定为现有数据库的资源 ID,并且必须指定 restorePointInTime。

恢复:通过还原异地复制的备份来创建数据库。 sourceDatabaseId 必须指定为可恢复的数据库资源 ID 才能还原。

还原:通过还原已删除数据库的备份来创建数据库。 必须指定 sourceDatabaseId。 如果 sourceDatabaseId 是数据库的原始资源 ID,则必须指定 sourceDatabaseDeletionDate。 否则,sourceDatabaseId 必须是可还原删除的数据库资源 ID,并且将忽略 sourceDatabaseDeletionDate。 还可以指定 restorePointInTime,以便从以前的时间点还原。

RestoreLongTermRetentionBackup:通过从长期保留保管库还原来创建数据库。 recoveryServicesRecoveryPointResourceId 必须指定为恢复点资源 ID。

DataWarehouse 版本不支持 Copy、Secondary 和 RestoreLongTermRetentionBackup。

说明
Default

默认

Copy

Copy

Secondary

次级

PointInTimeRestore

PointInTimeRestore

Restore

还原

Recovery

恢复

RestoreExternalBackup

恢复外部备份

RestoreExternalBackupSecondary

恢复外部备份次级

RestoreLongTermRetentionBackup

恢复长期保留备份

OnlineSecondary

在线中学

Database

数据库资源。

名称 类型 说明
id

string (arm-id)

资源的完全限定资源 ID。 例如,“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}”

identity

DatabaseIdentity

数据库的Azure Active Directory身份。

kind

string

数据库类型。 这是用于Azure门户体验的元数据。

location

string

资源所在的地理位置

managedBy

string

管理数据库的资源。

name

string

资源的名称

properties.autoPauseDelay

integer (int32)

数据库自动暂停的时间(以分钟为单位)。 -1 值表示禁用自动暂停

properties.availabilityZone

AvailabilityZoneType

指定数据库固定到的可用性区域。

properties.catalogCollation

CatalogCollationType

元数据目录的排序规则。

properties.collation

string

数据库的排序规则。

properties.createMode

CreateMode

指定数据库创建模式。

默认值:常规数据库创建。

复制:将数据库创建为现有数据库的副本。 sourceDatabaseId 必须指定为源数据库的资源 ID。

辅助数据库:将数据库创建为现有数据库的次要副本。 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 (date-time)

数据库的创建日期(ISO8601格式)。

properties.currentBackupStorageRedundancy

BackupStorageRedundancy

用于存储此数据库的备份的存储帐户类型。

properties.currentServiceObjectiveName

string

数据库的当前服务级别目标名称。

properties.currentSku

Sku

SKU 的名称和层。

properties.databaseId

string (uuid)

数据库的 ID。

properties.defaultSecondaryLocation

string

此数据库的默认次要区域。

properties.earliestRestoreDate

string (date-time)

这会记录此数据库的最早开始日期和时间(ISO8601格式)。

properties.elasticPoolId

string (arm-id)

包含此数据库的弹性池的资源标识符。

properties.encryptionProtector

string

如果数据库配置了每个数据库客户管理的密钥,则数据库的 Azure 密钥保管库 URI。

properties.encryptionProtectorAutoRotation

boolean

用于启用或禁用数据库加密保护程序 AKV 密钥自动轮换的标志。

properties.failoverGroupId

string

此数据库所属的故障转移组资源标识符。

properties.federatedClientId

string (uuid)

用于每个数据库 CMK 方案的跨租户的客户端 ID

properties.freeLimitExhaustionBehavior

FreeLimitExhaustionBehavior

指定免费数据库使用每月免费限制时的行为。

AutoPause:当剩余月份的可用限制用尽时,数据库将自动暂停。

BillForUsage:在耗尽免费限制后,数据库将继续联机,并且将收取任何超额费用。

properties.highAvailabilityReplicaCount

integer (int32)

与用于提供高可用性的业务关键版、高级版或超大规模版数据库关联的次要副本数。 不适用于弹性池中的“超大规模”数据库。

properties.isInfraEncryptionEnabled

boolean

为此数据库启用了基础结构加密。

properties.isLedgerOn

boolean

此数据库是否为账本数据库,这意味着数据库中的所有表都是账本表。 注意:创建数据库后,无法更改此属性的值。

properties.keys

<string,  DatabaseKey>

要使用的用户分配标识的资源 ID

properties.licenseType

DatabaseLicenseType

要申请此数据库的许可证类型。 如果你需要执照,LicenseIncluded;如果你有执照并且符合Azure 混合权益资格,则是BasePrice

properties.longTermRetentionBackupResourceId

string (arm-id)

与此数据库的创建操作关联的长期保留备份的资源标识符。

properties.maintenanceConfigurationId

string

分配给数据库的维护配置 ID。 此配置定义维护更新的发生时间。

properties.manualCutover

boolean

在“更新数据库”操作到“超大规模”层期间,是否需要执行客户控制的手动直接转换。

仅当将数据库从业务关键/常规用途/高级/标准层缩放到“超大规模”层时,此属性才适用。

指定 manualCutover 时,缩放操作将等待用户输入触发“超大规模”数据库的直接转换。

若要触发直接转换,请在缩放操作处于等待状态时提供“performCutover”参数。

properties.maxLogSizeBytes

integer (int64)

此数据库的最大日志大小。

properties.maxSizeBytes

integer (int64)

以字节表示的数据库的最大大小。

properties.minCapacity

number (double)

数据库始终分配的最小容量(如果未暂停)

properties.pausedDate

string (date-time)

由用户配置或操作(ISO8601格式)暂停数据库的日期。 如果数据库准备就绪,则为 Null。

properties.performCutover

boolean

在缩放操作正在进行期间触发客户控制的手动直接转换。

此属性参数仅适用于随“manualCutover”参数一起启动的缩放操作。

仅当正在将数据库从业务关键/常规用途/高级/标准层缩放到“超大规模”层时,此属性才适用。

指定 performCutover 时,缩放操作将触发直接转换并执行超大规模数据库的角色更改。

properties.preferredEnclaveType

AlwaysEncryptedEnclaveType

在数据库(即默认或 VBS enclave)上请求的 enclave 类型。

properties.readScale

DatabaseReadScale

只读路由的状态。 如果启用,连接字符串 中应用意图设置为只读的连接可能会被路由到同一区域内的只读次级副本。 不适用于弹性池中的“超大规模”数据库。

properties.recoverableDatabaseId

string (arm-id)

与此数据库的创建作关联的可恢复数据库的资源标识符。

properties.recoveryServicesRecoveryPointId

string (arm-id)

与此数据库的创建操作关联的恢复点的资源标识符。

properties.requestedBackupStorageRedundancy

BackupStorageRedundancy

用于存储此数据库的备份的存储帐户类型。

properties.requestedServiceObjectiveName

string

请求的数据库服务级别目标名称。

properties.restorableDroppedDatabaseId

string (arm-id)

与此数据库的创建操作关联的可还原已删除数据库的资源标识符。

properties.restorePointInTime

string (date-time)

指定将还原以创建新数据库的源数据库的时间点(ISO8601格式)。

properties.resumedDate

string (date-time)

用户操作或数据库登录恢复数据库的日期(ISO8601格式)。 如果暂停数据库,则为 Null。

properties.sampleName

SampleName

创建此数据库时要应用的示例架构的名称。

properties.secondaryType

SecondaryType

数据库的辅助类型(如果是辅助数据库)。 有效值为 Geo、Named 和 Standby。

properties.sourceDatabaseDeletionDate

string (date-time)

指定删除数据库的时间。

properties.sourceDatabaseId

string (arm-id)

与此数据库的创建作关联的源数据库的资源标识符。

properties.sourceResourceId

string (arm-id)

与此数据库的创建操作关联的源的资源标识符。

仅 DataWarehouse 版本支持此属性,并允许跨订阅还原。

指定 sourceResourceId 时,sourceDatabaseId、recoverableDatabaseId、restoreableDroppedDatabaseId 和 sourceDatabaseDeletionDate 不得指定,CreateMode 必须是 PointInTimeRestore、Restore 或 Recover。

createMode 为 PointInTimeRestore 时,sourceResourceId 必须是现有数据库或现有 sql 池的资源 ID,并且必须指定 restorePointInTime。

当 createMode 为 Restore 时,sourceResourceId 必须是可还原的已删除数据库或可还原的已删除 sql 池的资源 ID。

CreateMode 为 Recover 时,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

DatabaseStatus

数据库的状态。

properties.useFreeLimit

boolean

数据库是否使用免费的每月限制。 在订阅中的一个数据库上允许。

properties.zoneRedundant

boolean

此数据库是否为区域冗余,这意味着此数据库的副本将分布在多个可用性区域。

sku

Sku

数据库 SKU。

SKU 列表可能因区域和支持产品/服务而异。 要确定Azure区域内订阅可用的SKU(包括SKU名称、层级/版本、家族和容量),可以使用Capabilities_ListByLocation REST API或以下命令之一:

az sql db list-editions -l <location> -o table
Get-AzSqlServerServiceObjective -Location <location>
systemData

systemData

Azure 资源管理器 包含 createdBy 和 modifiedBy 信息的元数据。

tags

object

资源标记。

type

string

资源类型。 例如,“Microsoft。计算/虚拟机“或”Microsoft“。存储/存储账户”

DatabaseIdentity

Azure Active Directory identity configuration for a resource.

名称 类型 说明
tenantId

string (uuid)

The Azure Active Directory tenant id.

type

DatabaseIdentityType

标识类型

userAssignedIdentities

<string,  DatabaseUserIdentity>

要使用的用户分配标识的资源 ID

DatabaseIdentityType

标识类型

说明
None

没有

UserAssigned

UserAssigned

DatabaseKey

用于静态加密的数据库级密钥。

名称 类型 说明
creationDate

string (date-time)

数据库密钥创建日期。

keyVersion

string

数据库密钥的版本。

subregion

string

服务器密钥的子区域。

thumbprint

string

数据库密钥的指纹。

type

DatabaseKeyType

数据库密钥类型。 仅支持的值是“AzureKeyVault”。

DatabaseKeyType

数据库密钥类型。 仅支持的值是“AzureKeyVault”。

说明
AzureKeyVault

AzureKeyVault

DatabaseLicenseType

要申请此数据库的许可证类型。 如果你需要执照,LicenseIncluded;如果你有执照并且符合Azure 混合权益资格,则是BasePrice

说明
LicenseIncluded

包含许可

BasePrice

BasePrice

DatabaseReadScale

只读路由的状态。 如果启用,连接字符串 中应用意图设置为只读的连接可能会被路由到同一区域内的只读次级副本。 不适用于弹性池中的“超大规模”数据库。

说明
Enabled

已启用

Disabled

已禁用

DatabaseStatus

数据库的状态。

说明
Online

在线

Restoring

恢复

RecoveryPending

恢复待处理

Recovering

恢复

Suspect

怀疑

Offline

离线

Standby

备用

Shutdown

关机

EmergencyMode

紧急模式

AutoClosed

自动关闭

Copying

复制

Creating

创建

Inaccessible

无法

OfflineSecondary

离线次要

Pausing

暂停

Paused

已暂停

Resuming

继续

Scaling

规模化

OfflineChangingDwPerformanceTiers

离线变更DW性能等级

OnlineChangingDwPerformanceTiers

在线变动DW性能层级

Disabled

已禁用

Stopping

正在停止

Stopped

已停止

Starting

正在启动

DatabaseUserIdentity

Azure Active Directory identity configuration for a resource.

名称 类型 说明
clientId

string (uuid)

The Azure Active Directory client id.

principalId

string (uuid)

The Azure Active Directory principal id.

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

附加信息。

type

string

附加信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。

FreeLimitExhaustionBehavior

指定免费数据库使用每月免费限制时的行为。

AutoPause:当剩余月份的可用限制用尽时,数据库将自动暂停。

BillForUsage:在耗尽免费限制后,数据库将继续联机,并且将收取任何超额费用。

说明
AutoPause

自动暂停

BillOverUsage

账单过度使用

SampleName

创建此数据库时要应用的示例架构的名称。

说明
AdventureWorksLT

冒险工作LT

WideWorldImportersStd

WideWorldImportersStd

WideWorldImportersFull

WideWorldImportersFull

SecondaryType

数据库的辅助类型(如果是辅助数据库)。 有效值为 Geo、Named 和 Standby。

说明
Geo

地理位置

Named

名为

Standby

备用

Sku

ARM 资源 SKU。

名称 类型 说明
capacity

integer (int32)

特定 SKU 的容量。

family

string

如果服务具有不同代的硬件(对于同一 SKU,则可以在此处捕获)。

name

string

SKU 的名称,通常为字母 + 数字代码,例如 P3。

size

string

特定 SKU 的大小

tier

string

特定 SKU 的层或版本,例如基本 SKU、高级版。

systemData

与创建和上次修改资源相关的元数据。

名称 类型 说明
createdAt

string (date-time)

资源创建时间戳(UTC)。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识的类型。

lastModifiedAt

string (date-time)

资源上次修改的时间戳 (UTC)

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

上次修改资源的标识的类型。