Share via


Managed 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/managedInstances/{managedInstanceName}/databases/{databaseName}?api-version=2025-01-01

URI Parameters

Name In Required Type Description
databaseName
path True

string

The name of the database.

managedInstanceName
path True

string

The name of the managed instance.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string (uuid)

The ID of the target subscription. The value must be an UUID.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Request Body

Name Required Type Description
location True

string

The geo-location where the resource lives

properties.autoCompleteRestore

boolean

Whether to auto complete restore of this managed database.

properties.catalogCollation

CatalogCollationType

Collation of the metadata catalog.

properties.collation

string

Collation of the managed database.

properties.createMode

ManagedDatabaseCreateMode

Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required).

properties.crossSubscriptionRestorableDroppedDatabaseId

string

The restorable cross-subscription dropped database resource id to restore when creating this database.

properties.crossSubscriptionSourceDatabaseId

string

The resource identifier of the cross-subscription source database associated with create operation of this database.

properties.crossSubscriptionTargetManagedInstanceId

string

Target managed instance id used in cross-subscription restore.

properties.isLedgerOn

boolean

Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created.

properties.lastBackupName

string

Last backup file name for restore of this managed database.

properties.longTermRetentionBackupResourceId

string

The name of the Long Term Retention backup to be used for restore of this managed database.

properties.recoverableDatabaseId

string

The resource identifier of the recoverable database associated with create operation of this database.

properties.restorableDroppedDatabaseId

string

The restorable dropped database resource id to restore when creating this database.

properties.restorePointInTime

string (date-time)

Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.

properties.sourceDatabaseId

string

The resource identifier of the source database associated with create operation of this database.

properties.storageContainerIdentity

string

Conditional. If createMode is RestoreExternalBackup, this value is used. Specifies the identity used for storage container authentication. Can be 'SharedAccessSignature' or 'ManagedIdentity'; if not specified 'SharedAccessSignature' is assumed.

properties.storageContainerSasToken

string

Conditional. If createMode is RestoreExternalBackup and storageContainerIdentity is not ManagedIdentity, this value is required. Specifies the storage container sas token.

properties.storageContainerUri

string

Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored.

tags

object

Resource tags.

Responses

Name Type Description
200 OK

ManagedDatabase

Resource 'ManagedDatabase' update operation succeeded

201 Created

ManagedDatabase

Resource 'ManagedDatabase' create operation succeeded

Headers

  • Location: string
  • Retry-After: integer
202 Accepted

Resource operation accepted.

Headers

  • Location: string
  • Retry-After: integer
Other Status Codes

ErrorResponse

An unexpected error response.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Creates a new managed database by restoring from an external backup
Creates a new managed database by restoring from an external backup using managed identity
Creates a new managed database from restoring a geo-replicated backup
Creates a new managed database from restoring a long term retention backup
Creates a new managed database using cross subscription point in time restore
Creates a new managed database using point in time restore
Creates a new managed database with ledger on.
Creates a new managed database with maximal properties
Creates a new managed database with minimal properties

Creates a new managed database by restoring from an external backup

Sample request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/managedDatabase?api-version=2025-01-01

{
  "location": "southeastasia",
  "properties": {
    "autoCompleteRestore": true,
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "createMode": "RestoreExternalBackup",
    "lastBackupName": "last_backup_name",
    "storageContainerSasToken": "sv=2015-12-11&sr=c&sp=rl&sig=1234",
    "storageContainerUri": "https://myaccountname.blob.core.windows.net/backups"
  }
}

Sample response

{
  "name": "testdb1",
  "type": "Microsoft.Sql/managedInstances/databases",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1",
  "location": "southeastasia",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false,
    "status": "Online"
  },
  "tags": {
    "tagKey1": "TagValue1"
  }
}
{
  "name": "testdb2",
  "type": "Microsoft.Sql/managedInstances/databases",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2",
  "location": "southeastasia",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false,
    "status": "Online"
  },
  "tags": {
    "tagKey1": "TagValue1"
  }
}

Creates a new managed database by restoring from an external backup using managed identity

Sample request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/managedDatabase?api-version=2025-01-01

{
  "location": "southeastasia",
  "properties": {
    "autoCompleteRestore": true,
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "createMode": "RestoreExternalBackup",
    "lastBackupName": "last_backup_name",
    "storageContainerIdentity": "ManagedIdentity",
    "storageContainerUri": "https://myaccountname.blob.core.windows.net/backups"
  }
}

Sample response

{
  "name": "testdb1",
  "type": "Microsoft.Sql/managedInstances/databases",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1",
  "location": "southeastasia",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false,
    "status": "Online"
  },
  "tags": {
    "tagKey1": "TagValue1"
  }
}
{
  "name": "testdb2",
  "type": "Microsoft.Sql/managedInstances/databases",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2",
  "location": "southeastasia",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false,
    "status": "Online"
  },
  "tags": {
    "tagKey1": "TagValue1"
  }
}

Creates a new managed database from restoring a geo-replicated backup

Sample request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/server1/databases/testdb_recovered?api-version=2025-01-01

{
  "location": "southeastasia",
  "properties": {
    "createMode": "Recovery",
    "recoverableDatabaseId": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/Default-SQL-WestEurope/providers/Microsoft.Sql/managedInstances/testsvr/recoverableDatabases/testdb"
  }
}

Sample response

{
  "name": "testdb_recovered",
  "type": "Microsoft.Sql/managedInstances/databases",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/server1/recoverableDatabases/testdb_recovered",
  "location": "southeastasia",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2018-11-07T04:41:33.937Z",
    "isLedgerOn": false,
    "status": "Online"
  },
  "tags": {
    "tagKey1": "TagValue1"
  }
}
{
  "name": "testdb_recovered",
  "type": "Microsoft.Sql/managedInstances/databases",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/recoverableDatabases/testdb_recovered",
  "location": "southeastasia",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2018-11-07T04:41:33.937Z",
    "isLedgerOn": false,
    "status": "Online"
  },
  "tags": {
    "tagKey1": "TagValue1"
  }
}

Creates a new managed database from restoring a long term retention backup

Sample request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/managedDatabase?api-version=2025-01-01

{
  "location": "southeastasia",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "createMode": "RestoreExternalBackup",
    "storageContainerSasToken": "sv=2015-12-11&sr=c&sp=rl&sig=1234",
    "storageContainerUri": "https://myaccountname.blob.core.windows.net/backups"
  }
}

Sample response

{
  "name": "testdb1",
  "type": "Microsoft.Sql/managedInstances/databases",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1",
  "location": "southeastasia",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false,
    "status": "Online"
  },
  "tags": {
    "tagKey1": "TagValue1"
  }
}
{
  "name": "testdb2",
  "type": "Microsoft.Sql/managedInstances/databases",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2",
  "location": "southeastasia",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false,
    "status": "Online"
  },
  "tags": {
    "tagKey1": "TagValue1"
  }
}

Creates a new managed database using cross subscription point in time restore

Sample request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/managedDatabase?api-version=2025-01-01

{
  "location": "southeastasia",
  "properties": {
    "createMode": "PointInTimeRestore",
    "crossSubscriptionSourceDatabaseId": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr2/databases/testdb",
    "crossSubscriptionTargetManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr",
    "restorePointInTime": "2017-07-14T05:35:31.503Z"
  }
}

Sample response

{
  "name": "testdb1",
  "type": "Microsoft.Sql/managedInstances/databases",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1",
  "location": "southeastasia",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false,
    "status": "Online"
  },
  "tags": {
    "tagKey1": "TagValue1"
  }
}
{
  "name": "testdb2",
  "type": "Microsoft.Sql/managedInstances/databases",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2",
  "location": "southeastasia",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false,
    "status": "Online"
  },
  "tags": {
    "tagKey1": "TagValue1"
  }
}

Creates a new managed database using point in time restore

Sample request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/managedDatabase?api-version=2025-01-01

{
  "location": "southeastasia",
  "properties": {
    "createMode": "PointInTimeRestore",
    "restorePointInTime": "2017-07-14T05:35:31.503Z",
    "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb"
  }
}

Sample response

{
  "name": "testdb1",
  "type": "Microsoft.Sql/managedInstances/databases",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1",
  "location": "southeastasia",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false,
    "status": "Online"
  },
  "tags": {
    "tagKey1": "TagValue1"
  }
}
{
  "name": "testdb2",
  "type": "Microsoft.Sql/managedInstances/databases",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2",
  "location": "southeastasia",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false,
    "status": "Online"
  },
  "tags": {
    "tagKey1": "TagValue1"
  }
}

Creates a new managed database with ledger on.

Sample request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/managedDatabase?api-version=2025-01-01

{
  "location": "southeastasia",
  "properties": {
    "isLedgerOn": true
  }
}

Sample response

{
  "name": "testdb1",
  "type": "Microsoft.Sql/managedInstances/databases",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb1",
  "location": "southeastasia",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": true,
    "status": "Online"
  },
  "tags": {
    "tagKey1": "TagValue1"
  }
}
{
  "name": "testdb2",
  "type": "Microsoft.Sql/managedInstances/databases",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb2",
  "location": "southeastasia",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": true,
    "status": "Online"
  },
  "tags": {
    "tagKey1": "TagValue1"
  }
}
Location: https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2022-08-01

Creates a new managed database with maximal properties

Sample request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/managedDatabase?api-version=2025-01-01

{
  "location": "southeastasia",
  "tags": {
    "tagKey1": "TagValue1"
  }
}

Sample response

{
  "name": "testdb1",
  "type": "Microsoft.Sql/managedInstances/databases",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1",
  "location": "southeastasia",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false,
    "status": "Online"
  },
  "tags": {
    "tagKey1": "TagValue1"
  }
}
{
  "name": "testdb2",
  "type": "Microsoft.Sql/managedInstances/databases",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2",
  "location": "southeastasia",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false,
    "status": "Online"
  },
  "tags": {
    "tagKey1": "TagValue1"
  }
}
Location: https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2017-03-01

Creates a new managed database with minimal properties

Sample request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/managedDatabase?api-version=2025-01-01

{
  "location": "southeastasia"
}

Sample response

{
  "name": "testdb1",
  "type": "Microsoft.Sql/managedInstances/databases",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1",
  "location": "southeastasia",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false,
    "status": "Online"
  }
}
{
  "name": "testdb2",
  "type": "Microsoft.Sql/managedInstances/databases",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2",
  "location": "southeastasia",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "defaultSecondaryLocation": "North Europe",
    "isLedgerOn": false,
    "status": "Online"
  }
}
Location: https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2017-03-01

Definitions

Name Description
CatalogCollationType

Collation of the metadata catalog.

createdByType

The type of identity that created the resource.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

InaccessibilityReason

Root cause kind. Allowed values are “TransparentDataEncryption”, “DatabaseReplication”, and “Unknown”.

ManagedDatabase

A managed database resource.

ManagedDatabaseCreateMode

Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required).

ManagedDatabaseExtendedAccessibilityInfo

Managed Database Extended Accessibility Information

ManagedDatabaseStatus

Status of the database.

systemData

Metadata pertaining to creation and last modification of the resource.

CatalogCollationType

Collation of the metadata catalog.

Value Description
DATABASE_DEFAULT

DATABASE_DEFAULT

SQL_Latin1_General_CP1_CI_AS

SQL_Latin1_General_CP1_CI_AS

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

InaccessibilityReason

Root cause kind. Allowed values are “TransparentDataEncryption”, “DatabaseReplication”, and “Unknown”.

Value Description
Unknown

Unknown

TransparentDataEncryption

TransparentDataEncryption

DatabaseReplication

DatabaseReplication

ManagedDatabase

A managed database resource.

Name Type Description
id

string (arm-id)

Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

location

string

The geo-location where the resource lives

name

string

The name of the resource

properties.autoCompleteRestore

boolean

Whether to auto complete restore of this managed database.

properties.catalogCollation

CatalogCollationType

Collation of the metadata catalog.

properties.collation

string

Collation of the managed database.

properties.createMode

ManagedDatabaseCreateMode

Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required).

properties.creationDate

string (date-time)

Creation date of the database.

properties.crossSubscriptionRestorableDroppedDatabaseId

string

The restorable cross-subscription dropped database resource id to restore when creating this database.

properties.crossSubscriptionSourceDatabaseId

string

The resource identifier of the cross-subscription source database associated with create operation of this database.

properties.crossSubscriptionTargetManagedInstanceId

string

Target managed instance id used in cross-subscription restore.

properties.defaultSecondaryLocation

string

Geo paired region.

properties.earliestRestorePoint

string (date-time)

Earliest restore point in time for point in time restore.

properties.extendedAccessibilityInfo

ManagedDatabaseExtendedAccessibilityInfo

Additional observability and troubleshooting information for databases in ‘Inaccessible’ state.

properties.failoverGroupId

string

Instance Failover Group resource identifier that this managed database belongs to.

properties.isLedgerOn

boolean

Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created.

properties.lastBackupName

string

Last backup file name for restore of this managed database.

properties.longTermRetentionBackupResourceId

string

The name of the Long Term Retention backup to be used for restore of this managed database.

properties.recoverableDatabaseId

string

The resource identifier of the recoverable database associated with create operation of this database.

properties.restorableDroppedDatabaseId

string

The restorable dropped database resource id to restore when creating this database.

properties.restorePointInTime

string (date-time)

Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.

properties.sourceDatabaseId

string

The resource identifier of the source database associated with create operation of this database.

properties.status

ManagedDatabaseStatus

Status of the database.

properties.storageContainerIdentity

string

Conditional. If createMode is RestoreExternalBackup, this value is used. Specifies the identity used for storage container authentication. Can be 'SharedAccessSignature' or 'ManagedIdentity'; if not specified 'SharedAccessSignature' is assumed.

properties.storageContainerSasToken

string

Conditional. If createMode is RestoreExternalBackup and storageContainerIdentity is not ManagedIdentity, this value is required. Specifies the storage container sas token.

properties.storageContainerUri

string

Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored.

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

tags

object

Resource tags.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

ManagedDatabaseCreateMode

Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required).

Value Description
Default

Default

RestoreExternalBackup

RestoreExternalBackup

PointInTimeRestore

PointInTimeRestore

Recovery

Recovery

RestoreLongTermRetentionBackup

RestoreLongTermRetentionBackup

ManagedDatabaseExtendedAccessibilityInfo

Managed Database Extended Accessibility Information

Name Type Description
inaccessibilityReasonDescription

string

Root cause explanation and mitigation action.

inaccessibilityReasonErrorCode

string

SQL Server error code connected to the inaccessibility root cause.

inaccessibilityReasonKind

InaccessibilityReason

Root cause kind. Allowed values are “TransparentDataEncryption”, “DatabaseReplication”, and “Unknown”.

inaccessibilityReasonTdeKeyUri

string

For the root cause kind “TransparentDataEncryption”, the CMK URI.

ManagedDatabaseStatus

Status of the database.

Value Description
Online

Online

Offline

Offline

Shutdown

Shutdown

Creating

Creating

Inaccessible

Inaccessible

Restoring

Restoring

Updating

Updating

Stopping

Stopping

Stopped

Stopped

Starting

Starting

DbMoving

DbMoving

DbCopying

DbCopying

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.