Databases - Create Or Update

Creates a new database or updates an existing database.

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

URI Parameters

Name In Required Type Description
transparentDataEncryptionName
path True
  • string
The name of the transparent data encryption configuration.
subscriptionId
path True
  • string

The subscription ID that identifies an Azure subscription.

resourceGroupName
path True
  • string

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

serverName
path True
  • string

The name of the server.

databaseName
path True
  • string

The name of the database to be operated on (updated or created).

$expand
query
  • string
A comma separated list of child objects to expand in the response. Possible properties: serviceTierAdvisors, transparentDataEncryption.
api-version
query True
  • string

The API version to use for the request.

Request Body

Name Required Type Description
collation
  • string

The collation of the database. If createMode is not Default, this value is ignored.

createMode
  • enum:
    • Copy
    • Default
    • NonReadableSecondary
    • OnlineSecondary
    • PointInTimeRestore
    • Recovery
    • Restore
    • RestoreLongTermRetentionBackup

Specifies the mode of database creation.

Default: regular database creation.

Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the source database.

OnlineSecondary/NonReadableSecondary: creates a database as a (readable or nonreadable) secondary replica of an existing database. sourceDatabaseId must be specified as the resource ID of the existing primary database.

PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be specified.

Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable database resource ID to restore.

Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may also be specified to restore from an earlier point in time.

RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID.

Copy, NonReadableSecondary, OnlineSecondary and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition.

edition
  • enum:
    • Web
    • Business
    • Basic
    • Standard
    • Premium
    • Free
    • Stretch
    • DataWarehouse
    • System
    • System2

The edition of the database. The DatabaseEditions enumeration contains all the valid editions. If createMode is NonReadableSecondary or OnlineSecondary, this value is ignored. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation."

elasticPoolName
  • string

The name of the elastic pool the database is in. If elasticPoolName and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveName is ignored. Not supported for DataWarehouse edition.

location True
  • string

Resource location.

maxSizeBytes
  • string

The max size of the database expressed in bytes. If createMode is not Default, this value is ignored. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation."

readScale
  • enum:
    • Enabled
    • Disabled

Conditional. If the database is a geo-secondary, readScale indicates whether read-only connections are allowed to this database or not. Not supported for DataWarehouse edition.

recoveryServicesRecoveryPointResourceId
  • string

Conditional. If createMode is RestoreLongTermRetentionBackup, then this value is required. Specifies the resource ID of the recovery point to restore from.

requestedServiceObjectiveId
  • string
    uuid

The configured service level objective ID of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of currentServiceObjectiveId property. If requestedServiceObjectiveId and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveId overrides the value of requestedServiceObjectiveName. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation."

requestedServiceObjectiveName
  • enum:
    • Basic
    • S0
    • S1
    • S2
    • S3
    • P1
    • P2
    • P3
    • P4
    • P6
    • P11
    • P15
    • System
    • System2
    • ElasticPool

The name of the configured service level objective of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of serviceLevelObjective property. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation."

restorePointInTime
  • string
    date-time

Conditional. If createMode is PointInTimeRestore, this value is required. If createMode is Restore, this value is optional. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. Must be greater than or equal to the source database's earliestRestoreDate value.

sampleName
  • enum:
    • AdventureWorksLT

Indicates the name of the sample schema to apply when creating this database. If createMode is not Default, this value is ignored. Not supported for DataWarehouse edition.

sourceDatabaseDeletionDate
  • string
    date-time

Conditional. If createMode is Restore and sourceDatabaseId is the deleted database's original resource id when it existed (as opposed to its current restorable dropped database id), then this value is required. Specifies the time that the database was deleted.

sourceDatabaseId
  • string

Conditional. If createMode is Copy, NonReadableSecondary, OnlineSecondary, PointInTimeRestore, Recovery, or Restore, then this value is required. Specifies the resource ID of the source database. If createMode is NonReadableSecondary or OnlineSecondary, the name of the source database must be the same as the new database being created.

tags
  • <string, string>

Resource tags.

Responses

Name Type Description
200 OK

OK

201 Created

Created

202 Accepted

Accepted

Examples

Create a database min
Create a database max
Create a database as a copy
Create a database as an online secondary
Create a database as a non-readable secondary
Create a database as a point in time restore
Create a database as a dropped database restore to deletion time
Create a database as a dropped database restore to a specific point in time
Create a database as a geo restore
Create a database from a long term retention backup
Update a database's elastic pool'
Update a database max

Create a database min

Sample Request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/databases/testdb&api-version=2014-04-01
{
  "location": "Japan East"
}

Sample Response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-02-24T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-02-24T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}

Create a database max

Sample Request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/databases/testdb&api-version=2014-04-01
{
  "location": "Japan East",
  "properties": {
    "databaseId": "816c5f7e-0e36-4eec-9c51-eee7a276c14c",
    "edition": "Standard",
    "status": "Online",
    "createMode": "Default",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": "268435456000",
    "creationDate": "2017-02-10T01:37:18.847Z",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:48:08.237Z",
    "containmentState": 2,
    "readScale": "Disabled",
    "sampleName": "AdventureWorksLT"
  }
}

Sample Response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-8931/providers/Microsoft.Sql/servers/sqlcrudtest-1932/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "databaseId": "816c5f7e-0e36-4eec-9c51-eee7a276c14c",
    "edition": "Standard",
    "status": "Online",
    "createMode": "Default",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": "268435456000",
    "creationDate": "2017-02-10T01:37:18.847Z",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "sourceDatabaseId": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:48:08.237Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-8931/providers/Microsoft.Sql/servers/sqlcrudtest-1932/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "databaseId": "816c5f7e-0e36-4eec-9c51-eee7a276c14c",
    "edition": "Standard",
    "status": "Online",
    "createMode": "Default",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": "268435456000",
    "creationDate": "2017-02-10T01:37:18.847Z",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "sourceDatabaseId": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:48:08.237Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}

Create a database as a copy

Sample Request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/databases/testdb&api-version=2014-04-01
{
  "location": "Japan East",
  "properties": {
    "createMode": "Copy",
    "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb"
  }
}

Sample Response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-02-24T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-02-24T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}

Create a database as an online secondary

Sample Request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/databases/testdb&api-version=2014-04-01
{
  "location": "Japan East",
  "properties": {
    "createMode": "OnlineSecondary",
    "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb"
  }
}

Sample Response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-02-24T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-02-24T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}

Create a database as a non-readable secondary

Sample Request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/databases/testdb&api-version=2014-04-01
{
  "location": "Japan East",
  "properties": {
    "createMode": "NonReadableSecondary",
    "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb"
  }
}

Sample Response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-02-24T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-02-24T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}

Create a database as a point in time restore

Sample Request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444 /resourceGroups/sqlcrudtest-8412/providers/Microsoft.Sql/servers/sqlcrudtest-3584/databases/testdb&api-version=2014-04-01
{
  "location": "Japan East",
  "properties": {
    "createMode": "PointInTimeRestore",
    "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444 /resourceGroups/sqlcrudtest-8412/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb",
    "restorePointInTime": "2017-02-16T21:24:37.467Z"
  }
}

Sample Response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-02-24T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-02-24T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}

Create a database as a dropped database restore to deletion time

Sample Request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444 /resourceGroups/sqlcrudtest-8412/providers/Microsoft.Sql/servers/sqlcrudtest-3584/databases/testdb&api-version=2014-04-01
{
  "location": "Japan East",
  "properties": {
    "createMode": "Restore",
    "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444 /resourceGroups/sqlcrudtest-8412/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/sourcedb",
    "sourceDatabaseDeletionDate": "2017-05-27T02:49:47.690Z"
  }
}

Sample Response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-05-30T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-05-30T22:50:46.547Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-05-30T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-05-30T22:50:46.547Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}

Create a database as a dropped database restore to a specific point in time

Sample Request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444 /resourceGroups/sqlcrudtest-8412/providers/Microsoft.Sql/servers/sqlcrudtest-3584/databases/testdb&api-version=2014-04-01
{
  "location": "Japan East",
  "properties": {
    "createMode": "Restore",
    "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444 /resourceGroups/sqlcrudtest-8412/providers/Microsoft.Sql/servers/sqlcrudtest-3782/restorableDroppedDatabases/sourcedb,131403269876900000",
    "restorePointInTime": "2017-05-20T21:24:37.467Z"
  }
}

Sample Response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-05-30T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-05-30T22:50:46.547Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-05-30T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-05-30T22:50:46.547Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}

Create a database as a geo restore

Sample Request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444 /resourceGroups/sqlcrudtest-8412/providers/Microsoft.Sql/servers/sqlcrudtest-3584/databases/testdb&api-version=2014-04-01
{
  "location": "Japan East",
  "properties": {
    "createMode": "Recovery",
    "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444 /resourceGroups/sqlcrudtest-8412/providers/Microsoft.Sql/servers/sqlcrudtest-3782/recoverableDatabases/sourcedb"
  }
}

Sample Response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-05-30T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-05-30T22:50:46.547Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-05-30T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-05-30T22:50:46.547Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}

Create a database from a long term retention backup

Sample Request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444 /resourceGroups/sqlcrudtest-8412/providers/Microsoft.Sql/servers/sqlcrudtest-3584/databases/testdb&api-version=2014-04-01
{
  "location": "Japan East",
  "properties": {
    "createMode": "RestoreLongTermRetentionBackup",
    "recoveryServicesRecoveryPointResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444 /resourceGroups/sqlcrudtest-8412/providers/Microsoft.RecoveryServices/vaults/testVault/backupFabrics/Azure/protectionContainers/AzureSqlContainer;Sql;sqlcrudtest-8412;testsvr/protectedItems/AzureSqlDb;dsName;testdb;9dafcc99-7c84-4727-88ee-1a4fdb89afd7/RecoveryPoints/16043455089734"
  }
}

Sample Response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-05-30T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-05-30T22:50:46.547Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-3782/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-05-30T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-05-30T22:50:46.547Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}

Update a database's elastic pool'

Sample Request

PUT https://management.azure.com/subscriptions/9d4e2ad0-e20b-4464-9219-353bded52513/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/databases/testdb&api-version=2014-04-01
{
  "properties": {
    "elasticPoolName": "7537"
  },
  "location": "Japan East"
}

Sample Response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}

Update a database max

Sample Request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/databases/testdb&api-version=2014-04-01
{
  "location": "Japan East",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "createMode": "Default",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "containmentState": 2,
    "readScale": "Disabled"
  }
}

Sample Response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-02-24T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases",
  "location": "Japan East",
  "kind": "v12.0,user",
  "properties": {
    "edition": "Standard",
    "status": "Online",
    "serviceLevelObjective": "S0",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-02-24T22:39:46.547Z",
    "maxSizeBytes": "268435456000",
    "currentServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveId": "f1173c43-91bd-4aaa-973c-54e79e15235b",
    "requestedServiceObjectiveName": "S0",
    "sampleName": null,
    "defaultSecondaryLocation": "Japan West",
    "earliestRestoreDate": "2017-02-10T01:52:52.923Z",
    "elasticPoolName": null,
    "containmentState": 2,
    "readScale": "Disabled",
    "failoverGroupId": null
  }
}

Definitions

Database
OperationImpact

The impact of an operation, both in absolute and relative terms.

RecommendedIndex

Represents a database recommended index.

ServiceTierAdvisor

Represents a Service Tier Advisor.

SloUsageMetric

A Slo Usage Metric.

TransparentDataEncryption

Represents a database transparent data encryption configuration.

Name Type Description
collation
  • string

The collation of the database. If createMode is not Default, this value is ignored.

containmentState
  • integer
    int64

The containment state of the database.

createMode
  • enum:
    • Copy
    • Default
    • NonReadableSecondary
    • OnlineSecondary
    • PointInTimeRestore
    • Recovery
    • Restore
    • RestoreLongTermRetentionBackup

Specifies the mode of database creation.

Default: regular database creation.

Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the source database.

OnlineSecondary/NonReadableSecondary: creates a database as a (readable or nonreadable) secondary replica of an existing database. sourceDatabaseId must be specified as the resource ID of the existing primary database.

PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be specified.

Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable database resource ID to restore.

Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may also be specified to restore from an earlier point in time.

RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID.

Copy, NonReadableSecondary, OnlineSecondary and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition.

creationDate
  • string
    date-time

The creation date of the database (ISO8601 format).

currentServiceObjectiveId
  • string
    uuid

The current service level objective ID of the database. This is the ID of the service level objective that is currently active.

databaseId
  • string
    uuid

The ID of the database.

defaultSecondaryLocation
  • string

The default secondary region for this database.

earliestRestoreDate
  • string
    date-time

This records the earliest start date and time that restore is available for this database (ISO8601 format).

edition
  • enum:
    • Web
    • Business
    • Basic
    • Standard
    • Premium
    • Free
    • Stretch
    • DataWarehouse
    • System
    • System2

The edition of the database. The DatabaseEditions enumeration contains all the valid editions. If createMode is NonReadableSecondary or OnlineSecondary, this value is ignored. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation."

elasticPoolName
  • string

The name of the elastic pool the database is in. If elasticPoolName and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveName is ignored. Not supported for DataWarehouse edition.

failoverGroupId
  • string

The resource identifier of the failover group containing this database.

kind
  • string

Kind of database. This is metadata used for the Azure portal experience.

location
  • string

Resource location.

maxSizeBytes
  • string

The max size of the database expressed in bytes. If createMode is not Default, this value is ignored. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation."

readScale
  • enum:
    • Enabled
    • Disabled

Conditional. If the database is a geo-secondary, readScale indicates whether read-only connections are allowed to this database or not. Not supported for DataWarehouse edition.

recommendedIndex

The recommended indices for this database.

recoveryServicesRecoveryPointResourceId
  • string

Conditional. If createMode is RestoreLongTermRetentionBackup, then this value is required. Specifies the resource ID of the recovery point to restore from.

requestedServiceObjectiveId
  • string
    uuid

The configured service level objective ID of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of currentServiceObjectiveId property. If requestedServiceObjectiveId and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveId overrides the value of requestedServiceObjectiveName. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation."

requestedServiceObjectiveName
  • enum:
    • Basic
    • S0
    • S1
    • S2
    • S3
    • P1
    • P2
    • P3
    • P4
    • P6
    • P11
    • P15
    • System
    • System2
    • ElasticPool

The name of the configured service level objective of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of serviceLevelObjective property. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation."

restorePointInTime
  • string
    date-time

Conditional. If createMode is PointInTimeRestore, this value is required. If createMode is Restore, this value is optional. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. Must be greater than or equal to the source database's earliestRestoreDate value.

sampleName
  • enum:
    • AdventureWorksLT

Indicates the name of the sample schema to apply when creating this database. If createMode is not Default, this value is ignored. Not supported for DataWarehouse edition.

serviceLevelObjective
  • enum:
    • Basic
    • S0
    • S1
    • S2
    • S3
    • P1
    • P2
    • P3
    • P4
    • P6
    • P11
    • P15
    • System
    • System2
    • ElasticPool

The current service level objective of the database.

serviceTierAdvisors

The list of service tier advisors for this database. Expanded property

sourceDatabaseDeletionDate
  • string
    date-time

Conditional. If createMode is Restore and sourceDatabaseId is the deleted database's original resource id when it existed (as opposed to its current restorable dropped database id), then this value is required. Specifies the time that the database was deleted.

sourceDatabaseId
  • string

Conditional. If createMode is Copy, NonReadableSecondary, OnlineSecondary, PointInTimeRestore, Recovery, or Restore, then this value is required. Specifies the resource ID of the source database. If createMode is NonReadableSecondary or OnlineSecondary, the name of the source database must be the same as the new database being created.

status
  • string

The status of the database.

tags
  • <string, string>

Resource tags.

transparentDataEncryption

The transparent data encryption info for this database.

The impact of an operation, both in absolute and relative terms.

Name Type Description
changeValueAbsolute
  • number
    double

The absolute impact to dimension.

changeValueRelative
  • number
    double

The relative impact to dimension (null if not applicable)

name
  • string

The name of the impact dimension.

unit
  • string

The unit in which estimated impact to dimension is measured.

Represents a database recommended index.

Name Type Description
action
  • enum:
    • Create
    • Drop
    • Rebuild

The proposed index action. You can create a missing index, drop an unused index, or rebuild an existing index to improve its performance.

columns
  • string[]

Columns over which to build index

created
  • string
    date-time

The UTC datetime showing when this resource was created (ISO8601 format).

estimatedImpact

The estimated impact of doing recommended index action.

includedColumns
  • string[]

The list of column names to be included in the index

indexScript
  • string

The full build index script

indexType
  • enum:
    • CLUSTERED
    • NONCLUSTERED
    • COLUMNSTORE
    • CLUSTERED COLUMNSTORE

The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, CLUSTERED COLUMNSTORE)

lastModified
  • string
    date-time

The UTC datetime of when was this resource last changed (ISO8601 format).

reportedImpact

The values reported after index action is complete.

schema
  • string

The schema where table to build index over resides

state
  • enum:
    • Active
    • Pending
    • Executing
    • Verifying
    • Pending Revert
    • Reverting
    • Reverted
    • Ignored
    • Expired
    • Blocked
    • Success

The current recommendation state.

table
  • string

The table on which to build index.

Represents a Service Tier Advisor.

Name Type Description
activeTimeRatio
  • number
    double

The activeTimeRatio for service tier advisor.

avgDtu
  • number
    double

Gets or sets avgDtu for service tier advisor.

confidence
  • number
    double

Gets or sets confidence for service tier advisor.

currentServiceLevelObjective
  • string

Gets or sets currentServiceLevelObjective for service tier advisor.

currentServiceLevelObjectiveId
  • string
    uuid

Gets or sets currentServiceLevelObjectiveId for service tier advisor.

databaseSizeBasedRecommendationServiceLevelObjective
  • string

Gets or sets databaseSizeBasedRecommendationServiceLevelObjective for service tier advisor.

databaseSizeBasedRecommendationServiceLevelObjectiveId
  • string
    uuid

Gets or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service tier advisor.

disasterPlanBasedRecommendationServiceLevelObjective
  • string

Gets or sets disasterPlanBasedRecommendationServiceLevelObjective for service tier advisor.

disasterPlanBasedRecommendationServiceLevelObjectiveId
  • string
    uuid

Gets or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service tier advisor.

maxDtu
  • number
    double

Gets or sets maxDtu for service tier advisor.

maxSizeInGB
  • number
    double

Gets or sets maxSizeInGB for service tier advisor.

minDtu
  • number
    double

Gets or sets minDtu for service tier advisor.

observationPeriodEnd
  • string
    date-time

The observation period start (ISO8601 format).

observationPeriodStart
  • string
    date-time

The observation period start (ISO8601 format).

overallRecommendationServiceLevelObjective
  • string

Gets or sets overallRecommendationServiceLevelObjective for service tier advisor.

overallRecommendationServiceLevelObjectiveId
  • string
    uuid

Gets or sets overallRecommendationServiceLevelObjectiveId for service tier advisor.

serviceLevelObjectiveUsageMetrics

Gets or sets serviceLevelObjectiveUsageMetrics for the service tier advisor.

usageBasedRecommendationServiceLevelObjective
  • string

Gets or sets usageBasedRecommendationServiceLevelObjective for service tier advisor.

usageBasedRecommendationServiceLevelObjectiveId
  • string
    uuid

Gets or sets usageBasedRecommendationServiceLevelObjectiveId for service tier advisor.

A Slo Usage Metric.

Name Type Description
inRangeTimeRatio
  • number
    double

Gets or sets inRangeTimeRatio for SLO usage metric.

serviceLevelObjective
  • enum:
    • Basic
    • S0
    • S1
    • S2
    • S3
    • P1
    • P2
    • P3
    • P4
    • P6
    • P11
    • P15
    • System
    • System2
    • ElasticPool

The serviceLevelObjective for SLO usage metric.

serviceLevelObjectiveId
  • string
    uuid

The serviceLevelObjectiveId for SLO usage metric.

Represents a database transparent data encryption configuration.

Name Type Description
location
  • string

Resource location.

status
  • enum:
    • Enabled
    • Disabled

The status of the database transparent data encryption.