Databases - Update

Updates an existing database.

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}?api-version=2017-10-01-preview

URI Parameters

Name In Required Type Description
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.

api-version
query True
  • string

The API version to use for the request.

Request Body

Name Required Type Description
properties.catalogCollation

Collation of the metadata catalog.

properties.collation
  • string

The collation of the database.

properties.createMode

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.

Secondary: creates a database as a 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, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition.

properties.elasticPoolId
  • string

The resource identifier of the elastic pool containing this database.

properties.licenseType

The license type to apply for this database.

properties.longTermRetentionBackupResourceId
  • string

The resource identifier of the long term retention backup associated with create operation of this database.

properties.maxSizeBytes
  • integer

The max size of the database expressed in bytes.

properties.readScale

The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region.

properties.recoverableDatabaseId
  • string

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

properties.recoveryServicesRecoveryPointId
  • string

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

properties.restorableDroppedDatabaseId
  • string

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

properties.restorePointInTime
  • string

Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.

properties.sampleName

The name of the sample schema to apply when creating this database.

properties.sourceDatabaseDeletionDate
  • string

Specifies the time that the database was deleted.

properties.sourceDatabaseId
  • string

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

properties.zoneRedundant
  • boolean

Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

sku

The name and tier of the SKU.

tags
  • <string, string>

Resource tags.

Responses

Name Type Description
200 OK

Successfully updated the database.

202 Accepted

Updating the database is in progress.

Other Status Codes

*** Error Responses: ***

  • 400 InvalidDatabaseCreateOrUpdateRequest - The request body for the create or update database operation is invalid.

  • 400 InvalidResourceId - Invalid resource identifier.

  • 400 InvalidSourceDatabaseId - Invalid source database identifier.

  • 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.

  • 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.

  • 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.

  • 400 MissingCollation - Collation is required.

  • 400 MissingMaxSizeBytes - MaxSizeBytes is required.

  • 400 MissingSkuName - Sku name is rerquired.

  • 400 MissingSourceDatabaseId - Missing source database identifier.

  • 400 InvalidSkuName - Invalid SKU name.

  • 400 MismatchedSkuNameAndCapacity - Mismatch between SKU name and capacity.

  • 400 MismatchedSkuNameAndTier - Mismatch between SKU name and tier.

  • 400 MismatchedSkuNameAndFamily - Mismatch between SKU name and family.

  • 400 DatabaseNameDoesNotMatchSourceDatabaseId - The database name specified doesn’t match the database name in sourceDatabaseId.

  • 400 ElasticPoolNotSupportedForExternalBackupRestore - Elastic pool is not supported for external backup restore

  • 400 InvalidRecoverableDatabaseId - Invalid recoverable database identifier.

  • 400 InvalidRecoveryServicesRecoveryPointId - Invalid recovery services recovery point identifier.

  • 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid

  • 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier

  • 400 MissingRecoverableDatabaseId - Missing recoverable database identifier.

  • 400 MissingRecoveryServicesRecoveryPointId - Missing recovery services recovery point Id.

  • 400 MissingRestorableDroppedDatabaseId - Missing restorableDroppedDatabaseId

  • 400 MissingRestorePointInTime - Missing restore point in time

  • 400 MissingSourceDatabaseDeletionDate - Missing source database deletion date

  • 400 MissingStorageContainerSasToken - Missing storage container SAS token

  • 400 MissingStorageContainerUri - Missing storage container URI

  • 400 RestorableDroppedDatabaseIdGivenForRestoreWithSourceDatabaseId - Cannot specify restorableDroppedDatabaseId when sourceDatabaseId is already given in restore create mode

  • 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes

  • 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.

  • 400 CannotUpdateToFreeDatabase - Updating a database to the free sku is not supported.

  • 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.

  • 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.

  • 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.

  • 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.

  • 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.

  • 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.

  • 400 ServerNotFound - The requested server was not found.

  • 400 SourceDatabaseNotFound - The source database does not exist.

  • 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.

  • 400 ChangeUnsupportedOnEntity - User attempted an unsupported create/update/delete operation on a given entity.

  • 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.

  • 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currrently in progress.

  • 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.

  • 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.

  • 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.

  • 400 JobAgentDatabaseEditionUnsupported - The specified database's service level objective is not supported for use as a job agent database.

  • 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.

  • 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.

  • 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.

  • 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.

  • 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.

  • 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.

  • 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.

  • 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 and Key Type is RSA.

  • 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.

  • 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.

  • 400 InvalidSku - The user specified an invalid sku.

  • 400 TokenTooLong - The provided token is too long.

  • 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.

  • 400 InvalidMaxSizeTierCombination - The specified tier does not support the specified database max size.

  • 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.

  • 400 InvalidTier - The user specified an invalid tier.

  • 400 OfferDisabledOnSubscription - Subscription offer type is restricted from provisioning the requested resource.

  • 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.

  • 400 SubscriptionNotFound - The requested subscription was not found.

  • 400 InvalidServerName - Invalid server name specified.

  • 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.

  • 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.

  • 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.

  • 400 ResourcePoolNotFound - Specified elastic pool does not exist in the specified logical server.

  • 400 InvalidCollation - Collation is not recognized by the server.

  • 400 ElasticPoolSkuCombinationInvalid - Elastic pool and sku can be specified together only if sku is specified as 'ElasticPool'.

  • 400 ElasticPoolTierCombinationInvalid - The database tier is different than the elastic pool service tier.

  • 400 TierChangeUnsupportedDueToMemoryOptimizedObject - The database cannot update its sku because it has memory-optimized objects.

  • 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.

  • 400 UpdateNotAllowedInCurrentReplicationState - The operation is disallowed on the database in its current replication state.

  • 400 GeoReplicaLimitReached - The per-replica replication limit was reached.

  • 400 ElasticPoolDatabaseCountOverLimit - Attempting to create or add database to elastic pool when the database count limit of the elastic pool has been reached.

  • 400 ReplicationSourceAndTargetMustHaveSameName - The replication source and target databases must have the same name.

  • 400 CannotChangeToOrFromDataWarehouseTier - User attempted to change the sku of a database from DataWarehouse tier to non DataWarehouse tiers or vice versa.

  • 400 ReplicationSourceAndTargetMustBeInDifferentServers - The replication source and target databases must be in different logical servers.

  • 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.

  • 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.

  • 401 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.

  • 401 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured on server. Please contact support.

  • 401 AzureKeyVaultMissingPermissions - The server is mising required permissions on the Azure Key Vault.

  • 401 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.

  • 401 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Serivce Principal not found error was encountered.

  • 404 OperationIdNotFound - The operation with Id does not exist.

  • 404 SubscriptionDoesNotHaveServer - The requested server was not found

  • 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.

  • 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions

  • 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.

  • 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.

  • 409 OperationCancelled - The operation has been cancelled by user.

  • 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.

  • 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.

  • 409 ServerKeyDoesNotExists - The server key does not exist.

  • 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.

  • 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.

  • 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.

  • 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.

  • 409 RemoteDatabaseExists - The destination database name already exists on the destination server.

  • 409 SubscriptionDisabled - Subscription is disabled.

  • 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.

  • 409 SkuAssignmentInProgress - The current assignment request cannot be processed because a previous request has not completed.

  • 409 ServerDisabled - Server is disabled.

  • 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.

  • 409 ServerDtuQuotaExceeded - Could not perform the operation because server would exceed the allowed Database Throughput Unit quota.

  • 409 UnableToAlterDatabaseInReplication - User altered edition on a database in a replication relationship.

  • 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.

  • 409 InvalidOperationForDatabaseInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.

  • 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.

  • 409 CurrentMemoryUsageExceedsSkuQuota - User attempted an sku update operation that cannot be completed due to the higher resource consumption.

  • 409 ServerKeyNameAlreadyExists - The server key already exists on the server.

  • 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.

  • 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.

  • 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.

  • 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows

  • 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed

  • 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .

  • 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.

  • 504 RequestTimeout - Service request exceeded the allowed timeout.

Examples

Updates a database.

Sample Request

PATCH https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb?api-version=2017-10-01-preview
{
  "sku": {
    "name": "S1",
    "tier": "Standard"
  },
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 1073741824
  }
}

Sample Response

{
  "sku": {
    "name": "S1",
    "tier": "Standard"
  },
  "kind": "v12.0,user",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 1073741824,
    "status": "Online",
    "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "currentServiceObjectiveName": "S1",
    "defaultSecondaryLocation": "North Europe",
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS"
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases"
}

Definitions

CatalogCollationType

Collation of the metadata catalog.

CreateMode

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.

Secondary: creates a database as a 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, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition.

Database

A database resource.

DatabaseLicenseType

The license type to apply for this database.

DatabaseReadScale

The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region.

DatabaseStatus

The status of the database.

DatabaseUpdate

A database resource.

SampleName

The name of the sample schema to apply when creating this database.

Sku

An ARM Resource SKU.

CatalogCollationType

Collation of the metadata catalog.

Name Type Description
DATABASE_DEFAULT
  • string
SQL_Latin1_General_CP1_CI_AS
  • string

CreateMode

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.

Secondary: creates a database as a 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, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition.

Name Type Description
Copy
  • string
Default
  • string
OnlineSecondary
  • string
PointInTimeRestore
  • string
Recovery
  • string
Restore
  • string
RestoreExternalBackup
  • string
RestoreExternalBackupSecondary
  • string
RestoreLongTermRetentionBackup
  • string
Secondary
  • string

Database

A database resource.

Name Type Description
id
  • string

Resource ID.

kind
  • string

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

location
  • string

Resource location.

managedBy
  • string

Resource that manages the database.

name
  • string

Resource name.

properties.catalogCollation

Collation of the metadata catalog.

properties.collation
  • string

The collation of the database.

properties.createMode

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.

Secondary: creates a database as a 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, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition.

properties.creationDate
  • string

The creation date of the database (ISO8601 format).

properties.currentServiceObjectiveName
  • string

The current service level objective name of the database.

properties.currentSku

The name and tier of the SKU.

properties.databaseId
  • string

The ID of the database.

properties.defaultSecondaryLocation
  • string

The default secondary region for this database.

properties.earliestRestoreDate
  • string

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

properties.elasticPoolId
  • string

The resource identifier of the elastic pool containing this database.

properties.failoverGroupId
  • string

Failover Group resource identifier that this database belongs to.

properties.licenseType

The license type to apply for this database.

properties.longTermRetentionBackupResourceId
  • string

The resource identifier of the long term retention backup associated with create operation of this database.

properties.maxLogSizeBytes
  • integer

The max log size for this database.

properties.maxSizeBytes
  • integer

The max size of the database expressed in bytes.

properties.readScale

The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region.

properties.recoverableDatabaseId
  • string

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

properties.recoveryServicesRecoveryPointId
  • string

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

properties.requestedServiceObjectiveName
  • string

The requested service level objective name of the database.

properties.restorableDroppedDatabaseId
  • string

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

properties.restorePointInTime
  • string

Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.

properties.sampleName

The name of the sample schema to apply when creating this database.

properties.sourceDatabaseDeletionDate
  • string

Specifies the time that the database was deleted.

properties.sourceDatabaseId
  • string

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

properties.status

The status of the database.

properties.zoneRedundant
  • boolean

Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

sku

The name and tier of the SKU.

tags
  • <string, string>

Resource tags.

type
  • string

Resource type.

DatabaseLicenseType

The license type to apply for this database.

Name Type Description
BasePrice
  • string
LicenseIncluded
  • string

DatabaseReadScale

The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region.

Name Type Description
Disabled
  • string
Enabled
  • string

DatabaseStatus

The status of the database.

Name Type Description
AutoClosed
  • string
Copying
  • string
Creating
  • string
EmergencyMode
  • string
Inaccessible
  • string
Offline
  • string
OfflineSecondary
  • string
Online
  • string
Paused
  • string
Pausing
  • string
Recovering
  • string
RecoveryPending
  • string
Restoring
  • string
Resuming
  • string
Scaling
  • string
Shutdown
  • string
Standby
  • string
Suspect
  • string

DatabaseUpdate

A database resource.

Name Type Description
properties.catalogCollation

Collation of the metadata catalog.

properties.collation
  • string

The collation of the database.

properties.createMode

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.

Secondary: creates a database as a 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, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition.

properties.creationDate
  • string

The creation date of the database (ISO8601 format).

properties.currentServiceObjectiveName
  • string

The current service level objective name of the database.

properties.currentSku

The name and tier of the SKU.

properties.databaseId
  • string

The ID of the database.

properties.defaultSecondaryLocation
  • string

The default secondary region for this database.

properties.earliestRestoreDate
  • string

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

properties.elasticPoolId
  • string

The resource identifier of the elastic pool containing this database.

properties.failoverGroupId
  • string

Failover Group resource identifier that this database belongs to.

properties.licenseType

The license type to apply for this database.

properties.longTermRetentionBackupResourceId
  • string

The resource identifier of the long term retention backup associated with create operation of this database.

properties.maxLogSizeBytes
  • integer

The max log size for this database.

properties.maxSizeBytes
  • integer

The max size of the database expressed in bytes.

properties.readScale

The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region.

properties.recoverableDatabaseId
  • string

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

properties.recoveryServicesRecoveryPointId
  • string

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

properties.requestedServiceObjectiveName
  • string

The requested service level objective name of the database.

properties.restorableDroppedDatabaseId
  • string

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

properties.restorePointInTime
  • string

Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.

properties.sampleName

The name of the sample schema to apply when creating this database.

properties.sourceDatabaseDeletionDate
  • string

Specifies the time that the database was deleted.

properties.sourceDatabaseId
  • string

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

properties.status

The status of the database.

properties.zoneRedundant
  • boolean

Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

sku

The name and tier of the SKU.

tags
  • <string, string>

Resource tags.

SampleName

The name of the sample schema to apply when creating this database.

Name Type Description
AdventureWorksLT
  • string
WideWorldImportersFull
  • string
WideWorldImportersStd
  • string

Sku

An ARM Resource SKU.

Name Type Description
capacity
  • integer

Capacity of the particular SKU.

family
  • string

If the service has different generations of hardware, for the same SKU, then that can be captured here.

name
  • string

The name of the SKU, typically, a letter + Number code, e.g. P3.

size
  • string

Size of the particular SKU

tier
  • string

The tier of the particular SKU, e.g. Basic, Premium.