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=2023-08-01

URI Parameters

Name In Required Type Description
databaseName
path True

string

The name of the database.

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.

subscriptionId
path True

string

The subscription ID that identifies an Azure subscription.

api-version
query True

string

The API version to use for the request.

Request Body

Name Required Type Description
location True

string

Resource location.

identity

DatabaseIdentity

The Azure Active Directory identity of the database.

properties.autoPauseDelay

integer (int32)

Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled

properties.availabilityZone

AvailabilityZoneType

Specifies the availability zone the database is pinned to.

properties.catalogCollation

CatalogCollationType

Collation of the metadata catalog.

properties.collation

string

The collation of the database.

properties.createMode

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 (arm-id)

The resource identifier of the elastic pool containing this database.

properties.encryptionProtector

string

The azure key vault URI of the database if it's configured with per Database Customer Managed Keys.

properties.encryptionProtectorAutoRotation

boolean

The flag to enable or disable auto rotation of database encryption protector AKV key.

properties.federatedClientId

string (uuid)

The Client id used for cross tenant per database CMK scenario

properties.freeLimitExhaustionBehavior

FreeLimitExhaustionBehavior

Specifies the behavior when monthly free limits are exhausted for the free database.

AutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month.

BillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be billed.

properties.highAvailabilityReplicaCount

integer (int32)

The number of secondary replicas associated with the Business Critical, Premium, or Hyperscale edition database that are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool.

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.keys

<string,  DatabaseKey>

The resource ids of the user assigned identities to use

properties.licenseType

DatabaseLicenseType

The license type to apply for this database. LicenseIncluded if you need a license, or BasePrice if you have a license and are eligible for the Azure Hybrid Benefit.

properties.longTermRetentionBackupResourceId

string (arm-id)

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

properties.maintenanceConfigurationId

string

Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur.

properties.manualCutover

boolean

Whether or not customer controlled manual cutover needs to be done during Update Database operation to Hyperscale tier.

This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to Hyperscale tier.

When manualCutover is specified, the scaling operation will wait for user input to trigger cutover to Hyperscale database.

To trigger cutover, please provide 'performCutover' parameter when the Scaling operation is in Waiting state.

properties.maxSizeBytes

integer (int64)

The max size of the database expressed in bytes.

properties.minCapacity

number (double)

Minimal capacity that database will always have allocated, if not paused

properties.performCutover

boolean

To trigger customer controlled manual cutover during the wait state while Scaling operation is in progress.

This property parameter is only applicable for scaling operations that are initiated along with 'manualCutover' parameter.

This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to Hyperscale tier is already in progress.

When performCutover is specified, the scaling operation will trigger cutover and perform role-change to Hyperscale database.

properties.preferredEnclaveType

AlwaysEncryptedEnclaveType

Type of enclave requested on the database i.e. Default or VBS enclaves.

properties.readScale

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. Not applicable to a Hyperscale database within an elastic pool.

properties.recoverableDatabaseId

string (arm-id)

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

properties.recoveryServicesRecoveryPointId

string (arm-id)

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

properties.requestedBackupStorageRedundancy

BackupStorageRedundancy

The storage account type to be used to store backups for this database.

properties.restorableDroppedDatabaseId

string (arm-id)

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

properties.restorePointInTime

string (date-time)

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

properties.sampleName

SampleName

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

properties.secondaryType

SecondaryType

The secondary type of the database if it is a secondary. Valid values are Geo, Named and Standby.

properties.sourceDatabaseDeletionDate

string (date-time)

Specifies the time that the database was deleted.

properties.sourceDatabaseId

string (arm-id)

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

properties.sourceResourceId

string (arm-id)

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

This property is only supported for DataWarehouse edition and allows to restore across subscriptions.

When sourceResourceId is specified, sourceDatabaseId, recoverableDatabaseId, restorableDroppedDatabaseId and sourceDatabaseDeletionDate must not be specified and CreateMode must be PointInTimeRestore, Restore or Recover.

When createMode is PointInTimeRestore, sourceResourceId must be the resource ID of the existing database or existing sql pool, and restorePointInTime must be specified.

When createMode is Restore, sourceResourceId must be the resource ID of restorable dropped database or restorable dropped sql pool.

When createMode is Recover, sourceResourceId must be the resource ID of recoverable database or recoverable sql pool.

When source subscription belongs to a different tenant than target subscription, “x-ms-authorization-auxiliary” header must contain authentication token for the source tenant. For more details about “x-ms-authorization-auxiliary” header see https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant

properties.useFreeLimit

boolean

Whether or not the database uses free monthly limits. Allowed on one database in a subscription.

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

Sku

The database SKU.

The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the Capabilities_ListByLocation REST API or one of the following commands:

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

object

Resource tags.

Responses

Name Type Description
200 OK

Database

Successfully updated the database.

201 Created

Database

Successfully created the database.

202 Accepted

Creating or updating the database is in progress.

Headers

Location: string

Other Status Codes

ErrorResponse

*** Error Responses: ***

  • 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state

  • 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state

  • 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 required.

  • 400 MissingSourceDatabaseId - Missing source database identifier.

  • 400 InvalidLicenseType - The specified license type is invalid.

  • 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 LedgerNotAllowedWithSpecifiedCreateMode - IsLedgerOn is not allowed with the specified create mode.

  • 400 LedgerNotAllowedOnSampleDatabase - Database creation is not allowed with IsLedgerOn for a sample database.

  • 400 FreeLimitDatabaseNotAllowedInNonDefaultCreate - Free limit database creation is not allowed in non default create mode.

  • 400 AvailabilityZoneNotSupported - Requested availability zones for databases and elastic pools is not valid.

  • 400 MethodNotAllowedOnSpecifiedCreateMode - Http Patch or Merge not allowed on the specified create mode

  • 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 MultipleIdentitiesOnDatabase - Only one user assigned managed identity is supported at the Database Level.

  • 400 MultipleIdentityDelegationsOnDatabase - Only one identity delegation is supported at the Database Level.

  • 400 MissingPrimaryDelegatedIdentityClientId - In order to use delegated identities please provide a primary delegated identity client id.

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

  • 400 TokenTooLong - The provided token is too long.

  • 400 SourceDatabaseEncryptionProtectorKeyUriRequiredForPerDatabaseCMKCopyOrReplication - Geo secondary database missing AKV of geo primary database

  • 400 PerDatabaseCMKAKVKeyMaterialMissingOnGeoSecondary - All databases in geo replication must contain the same key material as the encryption protector of the source database. Please add the key '{0}' with the same key material to the target database '{1}'.

  • 400 PerDatabaseCMKAKVKeyUriMissingOnGeoSecondary - When the automatic rotation of database level TDE Protector is enabled, both source and target databases must be connected to the same key vault. Please add key '{0}' (from the same key vault that is connected to source database) to the target database '{1}'.

  • 400 PerDatabaseCMKCopyOrReplicationAttemptedWithoutCurrentKeysWithDatabaseName - While attempting to replicate a database configured with database level encryption protector, the current keys being used by the primary database must be passed to the secondary database '{0}'

  • 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 ServerNotFound - The requested server was not found.

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

  • 400 InvalidTier - The user specified an invalid tier.

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

  • 400 InvalidServerName - Invalid server name specified.

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

  • 400 CannotUpdateIsLedgerDatabase - The ledger property of an existing database cannot be updated.

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

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

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

  • 400 SourceDatabaseNotFound - The source database does not exist.

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

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

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

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

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

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

  • 400 InvalidDatabaseCreateMode - Invalid request to create a database.

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

  • 400 PartnerDBNotCompatibleForSGXEnclave - Attempt to set GeoDR link or update SLO for enclave enabled database is only supported when both database are running on DC-series hardware.

  • 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 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.

  • 400 TierChangeUnsupportedDueToCDCEnabledDatabase - The database cannot update its sku because it is enabled for CDC.

  • 400 IsLedgerDatabaseIsNotSupportedOnResourceType - Changing the ledger property is not supported for this resource type.

  • 400 InvalidSku - The user specified an invalid sku.

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

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

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

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

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

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

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

  • 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 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.

  • 400 UnableToCreateGeoChain - User attempted to create secondary database (chaining) even though automatic upload of ledger digests has been configured

  • 400 TargetElasticPoolDoesNotExist - The elastic pool does not exist on a server.

  • 400 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.

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

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

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

  • 400 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault.

  • 400 ElasticPoolNameRequired - User tried to create or update database to elastic pool service objective without specifying the name of the elastic pool.

  • 400 InvalidReadScaleEdition - User attempted to enable read scale on a database type that does not support it.

  • 400 InvalidReadScaleUnits - User attempted to provide a read scale value that is not supported.

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

  • 400 GeoSecondaryMaxSizeUpdateFailed - The geo-secondary database is of a SLO that does not support the requested maxsize value or the geo-secondary is in an unsupported region or an update operation is already in progress on the geo-secondary database.

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

  • 400 ElasticPoolInconsistentDtuGuaranteeSettings - Attempting to provide DTU min for databases in the elastic pool that exceeds requested DTUs of the elastic pool.

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

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

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

  • 400 RequestedDatabaseSizeRequiresShrink - User attempted to ALTER DATABASE MODIFY MAXSIZE to modify the MAXSIZE for a database to a smaller size then the current size.

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

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

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

  • 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.

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

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

  • 400 DatabaseNameInUse - Database already exists. Choose a different database name.

  • 400 SameKeyMaterialNotFoundOnRemoteServer - Secondary server does not have the key material of the primary server's encryption protector.

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

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

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

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

  • 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.

  • 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.

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

  • 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).

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

  • 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.

  • 400 UnsupportedCapacity - User tried to create or update database with capacity which is not supported.

  • 400 RestoreToFreeEditionNotSupported - Restore and GeoRestore target cannot be free database.

  • 400 RestoreNotSupportedForFreeEdition - Restore and GeoRestore are not supported for free database.

  • 400 InvalidDroppedDatabase - Source database dropped does not exist on server within the supported recovery period.

  • 400 InvalidLiveDatabase - Source database does not exist on server within the supported recovery period. If restoring a dropped database, please specify its deletion date.

  • 400 InvalidVldbRecoverySlo - The Hyperscale edition recovery requires both source and target databases to use Hyperscale service level objective.

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

  • 400 InvalidVldbRestoreSlo - The Hyperscale edition Point-In-Time restore requires both source and target databases to use Hyperscale service level objective.

  • 400 CannotSpecifyPoolOrSlo - Specifying an elastic pool and/or changing the service level objective or edition is not supported for edition.

  • 400 InvalidBackupStorageAccountType - User passed zrs/lrs during create/update of a database but it failed either because the customer is not whitelisted or because zrs is not available in the specified region.

  • 400 DatabaseInvalidSkuPropertyCombination - The properties of the requested sku are inconsistent. Please check that a valid combination is specified. See https://docs.microsoft.com/en-us/rest/api/sql/capabilities/listbylocation#serviceobjectivecapability for more details.

  • 400 DatabaseNamedReplicaPerDatabaseLimitExceeded - User tried create a named replica that would exceed the allowed number per primary database

  • 400 UnsupportedBackupStorageRedundancyForEdition - The requested backup storage redundancy is not supported for edition

  • 400 DatabaseIsCurrentlyPinned - Microsoft has pinned your database SQL Server engine version. To ensure your database does not hit production issues, any future scale operations on your database will be blocked until it has been un-pinned. Please contact Microsoft support for assistance with scaling.

  • 400 RestoreTargetEditionSizeInsufficient - User attempted to restore a database to an edition that is a smaller size than the current allocated size of the source.

  • 400 DatabaseCreationBlockedForNonActivatedCMKServer - SQL Pool creations are blocked for CMK enabled workspaces until the workspace is activated. First, enable purge protection and grant the workspace Managed Identity the required permissions (Get, Wrap Key, Unwrap Key) on the Azure Key Vault of the workspace key. Next, activate your workspace after you have granted access.

  • 400 InvalidIdentityId - One or more identity id(s) provided are not valid ARM resource id(s). Please input valid id(s) and try again.

  • 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided

  • 400 InvalidNumberOfIdentities - Only one user assigned managed identity is supported at the Database Level.

  • 400 NoRestorePointAvailable - The source database has not yet accomplished its first backup in order to support restore operations. Please retry the restore request later.

  • 400 DatabaseNamedReplicaChainingNotAllowed - User tried to create a named replica of a named replica which is not allowed.

  • 400 DatabaseNamedReplicaInvalidOperation - User attempted an unsupported operation on a named replica.

  • 400 DatabaseNamedReplicaInvalidSourceDatabase - User attempted to create a named replica in a different subscription or region than the source database.

  • 400 DatabaseNamedReplicaSourceDatabaseNotZoneRedundant - Zone Redundancy cannot be enabled on this Named Replica since the primary Hyperscale Database is not zone redundant.

  • 400 CannotAssignIdentityToMaster - Cannot assign an identity to a system database. Database identity cannot be assigned to 'master', 'model', 'tempdb', 'msdb', or 'resource' databases.

  • 400 PerDatabaseCMKDWNotSupported - Database-level CMK in preview is not supported for Datawarehouse edition.

  • 400 MissingThumbprintCrm - The restore operation of a CRM database failed because a required TDE certificate was missing. Please retry the restore operation to an existing elastic pool.

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

  • 400 RestoreTargetEditionSizeInsufficientV2 - User attempted to restore a database to an edition that is a smaller size than the allocated size of the restored database.

  • 400 ResourcePoolStorageLimitHitDuringRestore - The restored database can't be restored into the resource pool due to the remaining storage capacity in the pool.

  • 400 PerDatabaseCMKRestoreNotSupported - Database restore is not supported when Database-level CMK is configured in preview.

  • 400 PerDatabaseCMKHSNotSupported - Database-level CMK in preview is not supported for Hyperscale edition.

  • 400 PerDatabaseCMKGeoReplicationNotSupported - Geo Replication and Database Copy is not supported when Database-level CMK is configured in preview.

  • 400 InvalidStandbyGeoEdition - User attempted to create a DTU based standby geo.

  • 400 ElasticPoolInconsistentVcoreGuaranteeSettings - The number of databases and VCore min per database cannot exceed requested VCores of the elastic pool.

  • 400 GeoRestoreBackupStorageTypeNotSupported - Database recovery requests are invalid when issued against a database that is not configured to use geo-redundant backup storage.

  • 400 RestoreHyperscaleToNonHyperscale - Restoring a Hyperscale database backup to a non-Hyperscale service tier or vice versa is not supported.

  • 400 SubscriptionDoesNotHaveAccessToServer - The subscription does not have access to the specified server(s)

  • 400 RecoveryPointDoesNotExist - The specified recovery point either does not exist or is not valid.

  • 400 LtrBackupNotFound - The specified long term retention backup does not exist.

  • 400 InvalidPointInTime - The specified point in time is not valid for the database.

  • 400 GeoRestoreCannotResolveTargetCluster - Cannot resolve target cluster for server

  • 400 CannotSpecifyEditionOrSloWhenRestoringToPool - Specifying the target service level objective or edition is not supported when restoring to an elastic pool.

  • 400 RestoreNotSupportedForGeoDrSecondary - Point-in-time restore and database recovery operations are not supported on databases that are currently configured as geo-secondaries.

  • 400 DatabaseNamedReplicaBackupRetentionConfigurationNotSupported - User attempted configuring backup retention policy on a Named Replica.

  • 400 GeoRedundantBackupsNotPermittedForSubscription - Geo-redundant backup storage is blocked for all databases under subscription '{0}' by preview feature 'Azure SQL Database Block Geo-redundant Backup Storage'. Please select a different backup storage redundancy.

  • 400 RestoreHyperscaleToNonHyperscaleElasticPool - Restoring a Hyperscale database to an elastic pool which is not Hyperscale or restoring a database which is not Hyperscale to a Hyperscale elastic pool is not supported.

  • 400 RestoreIneligibleDatabaseName - The specified target database name, '{0}', is reserved and cannot be used in a restore operation.

  • 400 RestoreNotSupportedForSystemDb - Restore and database recovery are not supported for system databases.

  • 400 RestoreIneligibleDroppedDatabaseShortLifespan - The source database, '{0}', dropped on '{1}', has not existed long enough to support restores.

  • 400 RestoreIneligibleLiveDatabaseShortLifespan - The source database, '{0}', has not yet accomplished its first backup in order to support restore operations. Please wait until at least the indicated earliest restore date '{1}' and resubmit the request.

  • 400 RestoreCrossServerDisabled - For point-in-time restores, the target logical server must be the same as the source logical server. Consider restoring to the source database's server, or using database copy or database recovery.

  • 400 RestoreSameServerRecoveryDisabled - Same-server recovery is currently not supported. Consider using point-in-time restore or recovering to a different server.

  • 400 RestoreNotSupportedFromLtrBackupToEdition - Restore from long-term retention backup to '{0}' edition not supported.

  • 400 RestoreNotSupportedFromExternalBackupToEdition - Restore from external backup to '{0}' edition not supported.

  • 400 UpdateToServerlessIfLtrIsNotDisabled - Enabling auto-pause for a serverless database is not supported if long-term backup retention is enabled.

  • 400 DuplicateRestoreOperation - A restore request with the same target database name '{0}' on server '{1}' already exists.

  • 400 ExternalBackupUriMalformed - The external backup storage container URI is malformed.

  • 400 ExternalBackupUriHostNotAllowed - The host name for the external backup storage container URI is not allowed.

  • 400 ExternalBackupUriInvalidSchemeOrPort - The external backup storage container URI uses an invalid scheme or port. Please use https and port 443.

  • 400 ExternalBackupVldbUnsupported - Hyperscale does not support external backup restore requests.

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

  • 400 InvalidPitrPriorToVldbMigration - For database '{0}', specified point-in-time '{1}' is prior to the Hyperscale migration time of '{2}'. Please specify a target edition or service level objective which is not Hyperscale when restoring to a point earlier than the Hyperscale migration.

  • 400 MissingKeyVaultUriForRestore - Azure Key Vault key URI '{0}' is required to successfully restore the database '{1}' under server '{2}'.

  • 400 BlockRestoreOnVldbGeoSecondary - Restore of Hyperscale database where source database is geo-secondary is not allowed.

  • 400 BackupSetNotFound - No backups were found to restore the database. Please contact support to restore the database.

  • 400 IncorrectAccessToAzureKeyVault - Target server does not have access to all AKV Uris created during the backup time.

  • 400 RestoreFailureSqlInstanceUnhealthy - Unable to connect to the instance in order to perform restore operation.

  • 400 BackupSetBroken - Backup set is broken.

  • 400 TimeoutDuringRestore - A timeout was encountered while trying to connect to the restore target.

  • 400 BrokenRestorePlanGapInLogBackups - The restore plan is broken because firstLsn of current log backup is not equal to lastLsn of prev log backup.

  • 400 FullBackupMissingChecksum - Provided full backup is missing checksum.

  • 400 RequiredBackupIsNotLastRestored - Migration cannot be completed because provided backup file name is not the name of the last backup file that is restored.

  • 400 IncompatiblePhysicalLayoutNonOnlineDataFilesExist - Database backup contains incompatible physical layout. Non-online data files exist.

  • 400 IncompatiblePhysicalLayoutWrongNumberOfLogFiles - Database backup contains incompatible physical layout. Multiple log files are not supported.

  • 400 BackupSetNotFoundRecentPit - No backups were found to restore the database to the specified point in time. Please retry the operation. If the problem persists, contact support to restore the database.

  • 400 InvalidPublicMaintenanceConfiguration - User tried to specify public maintenance configuration which cannot be converted to internal id (malformed or wrong region).

  • 400 MaintenanceWindowNotSupportedForNamedReplica - User tried to create or update named replica with non-default maintenance window which is not supported.

  • 400 InvalidStandbyGeoReadScale - User attempted to enable read scale on a standby geo database that does not support it.

  • 400 PerDatabaseCMKKeyRotationAttemptedWhileOldThumbprintInUse - Key Rotation for the TDE Protector at the database level is blocked when active transactions are holding up the log encrypted with old keys. Please refer to aka.ms/azuresqldbkeyrotation for possible strategies to workaround this issue.

  • 400 PerDBCMKNotSupportedWithLTR - Database-level CMK is not supported when Long-term Backup Retention is enabled on the database.

  • 400 VBSEnclaveNotSupportedForDW - The preferredEnclaveType is not supported for dedicated SQL Pools.

  • 400 VBSEnclaveNotSupportedForDCSeriesSLO - Configuring the 'VBS' preferredEnclaveType for databases using the DC-series hardware configuration is not supported. DC-series databases are pre-configured with Intel SGX enclaves. Virtualization based security (VBS) enclaves are not supported.

  • 400 PerDatabaseCMKCopyOrReplicationAttemptedWithoutDatabaseLevelEncryptionProtector - Database-level encryption protector must be set on the target database while attempting to copy or replicate a database encrypted with a database level key.

  • 400 PerDatabaseCMKCopyOrReplicationAttemptedWithoutCurrentKeys - While attempting to replicate a database configured with database level encryption protector, the current keys being used by the primary must be passed to the secondary database.

  • 400 PerDatabaseCMKGeoPrimaryIsNotConfiguredWithDatabaseLevelEncryptionProtector - The geo-primary database must be configured with a database level encryption protector before setting a database level encryption protector on the geo-secondary.

  • 400 ElasticJobsNotSupportedOnAutoPauseEnabledDatabase - Auto-pause enabled serverless database is not supported as an Elastic Jobs database because job agent would prevent that database from pausing. You can either disable auto-pause on this serverless database or delete the job agent that is using this database. See here for more details: https://docs.microsoft.com/azure/azure-sql/database/serverless-tier-overview#auto-pausing

  • 400 VBSEnclaveNotSupportedForGeoReplicationWithDefaultEnclave - Configuring geo-replication is not supported for databases using different values of the preferredEnclaveType property. The primary '{0}' database on the '{1}' server uses the '{2}' preferredEnclaveType, whereas the specified preferredEnclaveType for the secondary '{3}' database on the '{4}' server is '{5}'.

  • 400 VBSEnclaveNotSupportedForPlannedFailoverBetweenDatabasesWithDifferentPreferredEnclaveTypes - Planned failover between primary and secondary database with different preferredEnclaveType is not supported for Virtualization-based security (VBS) enclaves.

  • 400 PerDatabaseCMKGeoPrimaryIsConfiguredWithDatabaseLevelEncryptionProtector - The geo-primary database must not be configured with a database level encryption protector when failing over to a geo-secondary without a database level encryption protector.

  • 400 CreateDatabaseAttemptedWithRotationInProgress - The create database operation can not be performed at this time due to ongoing Transparent Data Encryption (TDE) key rotation on the server. Please try the operation again later.

  • 400 VBSEnclaveResourcePoolInvalidCombination - Adding a database with '{0}' preferredEnclaveType to an elastic pool '{1}' with '{2}' preferredEnclaveType is not supported. Before adding the database to the elastic pool, ensure that the preferredEnclaveType is the same for both the database and the elastic pool. More information can be found on https://aka.ms/AlwaysEncryptedEnableSecureEnclaves

  • 400 MissingAsymmetricKeyOnTargetServer - Target server does not have access to an asymmetric key.

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

  • 400 MultipleDroppedDatabasesWithTheSameName - Found multiple dropped databases with the same name on server.

  • 400 AzureKeyVaultClientError - The Azure Key Vault client encountered an error.

  • 400 AzureKeyVaultClientInfoError - An error occurred while obtaining information for the Azure Key Vault client.

  • 400 AzureKeyVaultKeyThumbprintIsDifferent - The operation could not be completed because the Azure Key Vault Key material is different than the current encryption protector key.

  • 400 UnsupportedBackupStorageRedundancy - Specified Backup Storage Redundancy is not supported in target region.

  • 400 LTRSterlingToVldbMigrationNotSupported - Cannot change service objective for database to Hyperscale as long-term retention is not yet supported on Hyperscale. Please disable long-term retention on the database and retry.

  • 400 HyperscaleReverseMigrationNotSupported - Reverse migration of a Hyperscale database to Sterling hit an unsupported scenario.

  • 400 UpdateSloOperationIdDoesNotExist - The action failed because no active update-slo operation detected for server: {0}, database: {1};. Please retry the operation by specifying valid parameters.

  • 400 ManualCutoverUnsupported - Invalid use of manual-cutover option. Please check current and requested service objective and retry the operation by specifying valid parameters.

  • 400 LongTermRetentionMigrationRequestNotSupported - Subscription is not allowed LTR backup Migration feature.

  • 400 LongTermRetentionMigrationCrossClusterRequestNotSupported - Source and target subscriptions are not allowed to communicate for LTR backup copy feature.

  • 400 LongTermRetentionMigrationParameterMissing - Required parameter missing for the operation.

  • 400 LongTermRetentionMigrationSameServerNotSupported - LTR Copy feature is not supported to copy LTR backups within same server.

  • 400 LongTermRetentionMigrationTargetServerNotFound - Target server does not exists or is not ready for LTR backup copy operation.

  • 400 LongTermRetentionMigrationTargetDatabaseNotFound - Target Database does not exists on the server.

  • 400 LongTermRetentionMigrationStorageTypeNotSupported - Specified Backup Storage Redundancy is not supported in target region.

  • 400 LongTermRetentionMigrationStorageMismatch - Active backup redundancy of database does not match backup redundancy requested by customer.

  • 400 LtrOperationFailedBackupImmutable - Deleting Long Term Retention backup failed because the backup is immutable.

  • 400 LongTermRetentionMigrationDatabaseTypeNotSupported - LTR migration is only supported for managed instance and Azure SQL DB LTR backups.

  • 400 LongTermRetentionMigrationBackupStorageRedundancyNotAllowed - Changing backup storage redundancy is not allowed for LTR Copy operations.

  • 400 LtrRestoreFailedArchiveStorageTier - Restoring archived long-term retention backup is not supported. Restore can be performed only on rehydrated or regular long-term retention backups.

  • 400 LtrArchiveStorageTierNotEnabled - Archiving long-term retention backups is not enabled.

  • 400 LtrArchiveWrongParameters - ChangeLongTermRetentionBackupAccessTier is not supported for the desired (backupStorageAccessTier, operationMode) combination. Only (Archive, Move) and (Hot, Copy) are allowed.

  • 400 LTRArchiveRedundancyChangeFailed - Updating the backup storage redundancy type to zone-redundant storage is not supported when a long-term retention policy with the 'archive' backup storage access tier is set

  • 400 LongTermRetentionMigrationSubscriptionNotFound - The subscription could not be found.

  • 400 VBSEnclaveResourcePoolInvalidCombination - Adding a database with '{0}' preferredEnclaveType to an elastic pool '{1}' with '{2}' preferredEnclaveType is not supported. Before adding the database to the elastic pool, ensure that the preferredEnclaveType is the same for both the database and the elastic pool. More information can be found on https://aka.ms/AlwaysEncryptedEnableSecureEnclaves

  • 400 VBSEnclaveNotSupportedForDW - The preferredEnclaveType is not supported for dedicated SQL Pools.

  • 400 VBSEnclaveNotSupportedForDCSeriesSLO - Configuring the 'VBS' preferredEnclaveType for databases using the DC-series hardware configuration is not supported. DC-series databases are pre-configured with Intel SGX enclaves. Virtualization based security (VBS) enclaves are not supported.

  • 400 VBSEnclaveNotSupportedForGeoReplicationWithDefaultEnclave - Configuring geo-replication is not supported for databases using different values of the preferredEnclaveType property. The primary '{0}' database on the '{1}' server uses the '{2}' preferredEnclaveType, whereas the specified preferredEnclaveType for the secondary '{3}' database on the '{4}' server is '{5}'.

  • 400 VBSEnclaveNotSupportedForPlannedFailoverBetweenDatabasesWithDifferentPreferredEnclaveTypes - Planned failover between primary and secondary database with different preferredEnclaveType is not supported for Virtualization-based security (VBS) enclaves.

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

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

  • 404 SubscriptionDoesNotHaveServer - The requested server was not found

  • 404 SubscriptionNotFound - The requested subscription was not found.

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

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

  • 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.

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

  • 404 LongTermRetentionMigrationBackupNotFound - LTR backup specified does not exists.

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

  • 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.

  • 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 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 RemoteDatabaseExists - The destination database name already exists on the destination server.

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

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

  • 409 FreeDbAlreadyExists - Only one free database can exist for a subscription per region.

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

  • 409 ConflictingServerOperation - An operation is currently in progress for the 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 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.

  • 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 ServerDtuQuotaExceeded - Could not perform the operation because server would exceed the allowed Database Throughput Unit quota.

  • 409 UpdateSloFailedDatabaseTooBusy - Update SLO operation could not complete because database was too busy.

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

  • 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 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.

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

  • 409 TargetElasticPoolBeingUpdated - The update of elastic pool cannot be started because there is copy operation in progress for one of the databases in this elastic pool

  • 409 DatabaseCopyLimitPerReplicaReached - User reached the limit of concurrent database copies.

  • 409 ConflictRequestToUpdateBackupRedundancy - A conflict request to change backup storage redundancy is still in progress.

  • 409 DatabaseElasticPoolMaintenanceConflict - User tried to create or update a database with a specified maintenance configuration that conflicted with that of the elastic pool of the database.

  • 409 SubscriptionVcoreQuotaExceeded - Could not perform the operation because subscription would exceed the allowed vCore quota.

  • 409 LongTermRetentionMigrationRequestConflict - A conflict operation on this LTR backup is still in progress.

  • 409 LongTermRetentionMigrationBackupConflict - Another LTR backup with same backup time for target database exists.

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

  • 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.

  • 429 SubscriptionTooManyRequests - 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

  • 500 LongTermRetentionMigrationRequestFailedToStartOnTarget - Failed to start LTR backup copy request in target region.

  • 500 LongTermRetentionMigrationRequestCopyFailed - Copy operation failed for LTR backup blobs.

  • 500 LongTermRetentionMigrationRestoreVerExceeded - Restore verification failed after max attempts were reached.

  • 500 LongTermRetentionMigrationRestoreVerFailed - Restore verification failed.

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

  • 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 DatabaseUnavailable - The operation failed because the database is unavailable.

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

  • 504 RequestTimeout - Service request exceeded the allowed timeout.

Examples

Creates a data warehouse database as a cross-subscription restore from a backup of a dropped database.
Creates a data warehouse database as a cross-subscription restore from a geo-backup.
Creates a data warehouse database as a cross-subscription restore from a restore point of an existing database.
Creates a database as a copy.
Creates a database as a standby secondary.
Creates a database as an on-line secondary.
Creates a database as named replica secondary.
Creates a database from PointInTimeRestore.
Creates a database with availability zone specified.
Creates a database with database-level customer managed keys.
Creates a database with Default enclave type.
Creates a database with default mode.
Creates a database with encryption protector auto rotation.
Creates a database with ledger on.
Creates a database with minimum number of parameters.
Creates a database with preferred maintenance window.
Creates a database with specified backup storage redundancy.
Creates a database with VBS enclave type.
Creates a VCore database by specifying service objective name.
Creates a VCore database by specifying sku name and capacity.
Updates a database to Hyperscale SLO with manual cutover
Updates a database to Hyperscale tier by triggering manual cutover during Migration workflow

Creates a data warehouse database as a cross-subscription restore from a backup of a dropped database.

Sample request

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

{
  "location": "southeastasia",
  "properties": {
    "createMode": "Restore",
    "sourceResourceId": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/srcsvr/restorableDroppedDatabases/srcdw,131403269876900000"
  }
}

Sample response

{
  "sku": {
    "name": "DataWarehouse",
    "tier": "DataWarehouse",
    "capacity": 9000
  },
  "kind": "v12.0,user,datawarehouse,gen2",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 263882790666240,
    "status": "Online",
    "databaseId": "188784c9-d602-4684-86cf-e67b6f03551a",
    "creationDate": "2022-01-24T06:46:14.99Z",
    "currentServiceObjectiveName": "DW1000c",
    "requestedServiceObjectiveName": "DW1000c",
    "defaultSecondaryLocation": "eastus",
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "readScale": "Disabled",
    "currentSku": {
      "name": "DataWarehouse",
      "tier": "DataWarehouse",
      "capacity": 9000
    },
    "currentBackupStorageRedundancy": "Geo"
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdw",
  "name": "testdw",
  "type": "Microsoft.Sql/servers/databases"
}
{
  "sku": {
    "name": "DataWarehouse",
    "tier": "DataWarehouse",
    "capacity": 9000
  },
  "kind": "v12.0,user,datawarehouse,gen2",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 263882790666240,
    "status": "Online",
    "databaseId": "188784c9-d602-4684-86cf-e67b6f03551a",
    "creationDate": "2022-01-24T06:46:14.99Z",
    "currentServiceObjectiveName": "DW1000c",
    "requestedServiceObjectiveName": "DW1000c",
    "defaultSecondaryLocation": "eastus",
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "readScale": "Disabled",
    "currentSku": {
      "name": "DataWarehouse",
      "tier": "DataWarehouse",
      "capacity": 9000
    },
    "currentBackupStorageRedundancy": "Geo"
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdw",
  "name": "testdw",
  "type": "Microsoft.Sql/servers/databases"
}
Location: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111

Creates a data warehouse database as a cross-subscription restore from a geo-backup.

Sample request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-WestUS/providers/Microsoft.Sql/servers/testsvr/databases/testdw?api-version=2023-08-01

{
  "location": "westus",
  "properties": {
    "createMode": "Recovery",
    "sourceResourceId": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-EastUS/providers/Microsoft.Sql/servers/srcsvr/recoverabledatabases/srcdw"
  }
}

Sample response

{
  "sku": {
    "name": "DataWarehouse",
    "tier": "DataWarehouse",
    "capacity": 9000
  },
  "kind": "v12.0,user,datawarehouse,gen2",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 263882790666240,
    "status": "Online",
    "databaseId": "188784c9-d602-4684-86cf-e67b6f03551a",
    "creationDate": "2022-01-24T06:46:14.99Z",
    "currentServiceObjectiveName": "DW1000c",
    "requestedServiceObjectiveName": "DW1000c",
    "defaultSecondaryLocation": "eastus",
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "readScale": "Disabled",
    "currentSku": {
      "name": "DataWarehouse",
      "tier": "DataWarehouse",
      "capacity": 9000
    },
    "currentBackupStorageRedundancy": "Geo"
  },
  "location": "westus",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-WestUS/providers/Microsoft.Sql/servers/testsvr/databases/testdw",
  "name": "testdw",
  "type": "Microsoft.Sql/servers/databases"
}
{
  "sku": {
    "name": "DataWarehouse",
    "tier": "DataWarehouse",
    "capacity": 9000
  },
  "kind": "v12.0,user,datawarehouse,gen2",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 263882790666240,
    "status": "Online",
    "databaseId": "188784c9-d602-4684-86cf-e67b6f03551a",
    "creationDate": "2022-01-24T06:46:14.99Z",
    "currentServiceObjectiveName": "DW1000c",
    "requestedServiceObjectiveName": "DW1000c",
    "defaultSecondaryLocation": "eastus",
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "readScale": "Disabled",
    "currentSku": {
      "name": "DataWarehouse",
      "tier": "DataWarehouse",
      "capacity": 9000
    },
    "currentBackupStorageRedundancy": "Geo"
  },
  "location": "westus",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-WestUS/providers/Microsoft.Sql/servers/testsvr/databases/testdw",
  "name": "testdw",
  "type": "Microsoft.Sql/servers/databases"
}
Location: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111

Creates a data warehouse database as a cross-subscription restore from a restore point of an existing database.

Sample request

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

{
  "location": "southeastasia",
  "properties": {
    "createMode": "PointInTimeRestore",
    "sourceResourceId": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/srcsvr/databases/srcdw",
    "restorePointInTime": "2022-01-22T05:35:31.503Z"
  }
}

Sample response

{
  "sku": {
    "name": "DataWarehouse",
    "tier": "DataWarehouse",
    "capacity": 9000
  },
  "kind": "v12.0,user,datawarehouse,gen2",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 263882790666240,
    "status": "Online",
    "databaseId": "188784c9-d602-4684-86cf-e67b6f03551a",
    "creationDate": "2022-01-24T06:46:14.99Z",
    "currentServiceObjectiveName": "DW1000c",
    "requestedServiceObjectiveName": "DW1000c",
    "defaultSecondaryLocation": "eastus",
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "readScale": "Disabled",
    "currentSku": {
      "name": "DataWarehouse",
      "tier": "DataWarehouse",
      "capacity": 9000
    },
    "currentBackupStorageRedundancy": "Geo"
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdw",
  "name": "testdw",
  "type": "Microsoft.Sql/servers/databases"
}
{
  "sku": {
    "name": "DataWarehouse",
    "tier": "DataWarehouse",
    "capacity": 9000
  },
  "kind": "v12.0,user,datawarehouse,gen2",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 263882790666240,
    "status": "Online",
    "databaseId": "188784c9-d602-4684-86cf-e67b6f03551a",
    "creationDate": "2022-01-24T06:46:14.99Z",
    "currentServiceObjectiveName": "DW1000c",
    "requestedServiceObjectiveName": "DW1000c",
    "defaultSecondaryLocation": "eastus",
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "readScale": "Disabled",
    "currentSku": {
      "name": "DataWarehouse",
      "tier": "DataWarehouse",
      "capacity": 9000
    },
    "currentBackupStorageRedundancy": "Geo"
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdw",
  "name": "testdw",
  "type": "Microsoft.Sql/servers/databases"
}
Location: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111

Creates a database as a copy.

Sample request

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

{
  "location": "southeastasia",
  "sku": {
    "name": "S0",
    "tier": "Standard"
  },
  "properties": {
    "createMode": "Copy",
    "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb"
  }
}

Sample response

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

Creates a database as a standby secondary.

Sample request

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

{
  "location": "southeastasia",
  "sku": {
    "name": "S0",
    "tier": "Standard"
  },
  "properties": {
    "createMode": "Secondary",
    "secondaryType": "Standby",
    "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-NorthEurope/providers/Microsoft.Sql/servers/testsvr1/databases/testdb"
  }
}

Sample response

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

Creates a database as an on-line secondary.

Sample request

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

{
  "location": "southeastasia",
  "sku": {
    "name": "S0",
    "tier": "Standard"
  },
  "properties": {
    "createMode": "Secondary",
    "secondaryType": "Geo",
    "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-NorthEurope/providers/Microsoft.Sql/servers/testsvr1/databases/testdb"
  }
}

Sample response

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

Creates a database as named replica secondary.

Sample request

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

{
  "location": "southeastasia",
  "sku": {
    "name": "HS_Gen4",
    "tier": "Hyperscale",
    "capacity": 2
  },
  "properties": {
    "createMode": "Secondary",
    "secondaryType": "Named",
    "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-NorthEurope/providers/Microsoft.Sql/servers/testsvr1/databases/primarydb"
  }
}

Sample response

{
  "sku": {
    "name": "HS_Gen4",
    "tier": "Hyperscale",
    "family": "Gen4",
    "capacity": 2
  },
  "kind": "v12.0,user,vcore,hyperscale",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": -1,
    "status": "Online",
    "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
    "currentSku": {
      "name": "HS_Gen4",
      "tier": "Hyperscale",
      "family": "Gen4",
      "capacity": 2
    },
    "creationDate": "2017-06-07T04:41:33.937Z",
    "currentBackupStorageRedundancy": "Geo",
    "currentServiceObjectiveName": "HS_Gen4_2",
    "defaultSecondaryLocation": "North Europe",
    "earliestRestoreDate": "2017-06-07T04:51:33.937Z",
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "readScale": "Disabled",
    "requestedBackupStorageRedundancy": "Geo",
    "requestedServiceObjectiveName": "HS_Gen4_2",
    "highAvailabilityReplicaCount": 0,
    "licenseType": "LicenseIncluded",
    "secondaryType": "Named",
    "isLedgerOn": false,
    "isInfraEncryptionEnabled": false,
    "zoneRedundant": false
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases"
}
{
  "sku": {
    "name": "HS_Gen4",
    "tier": "Hyperscale",
    "family": "Gen4",
    "capacity": 2
  },
  "kind": "v12.0,user,vcore,hyperscale",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": -1,
    "status": "Online",
    "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
    "currentSku": {
      "name": "HS_Gen4",
      "tier": "Hyperscale",
      "family": "Gen4",
      "capacity": 2
    },
    "creationDate": "2017-06-07T04:41:33.937Z",
    "currentBackupStorageRedundancy": "Geo",
    "currentServiceObjectiveName": "HS_Gen4_2",
    "defaultSecondaryLocation": "North Europe",
    "earliestRestoreDate": "2017-06-07T04:51:33.937Z",
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "readScale": "Disabled",
    "requestedBackupStorageRedundancy": "Geo",
    "requestedServiceObjectiveName": "HS_Gen4_2",
    "highAvailabilityReplicaCount": 0,
    "licenseType": "LicenseIncluded",
    "secondaryType": "Named",
    "isLedgerOn": false,
    "isInfraEncryptionEnabled": false,
    "zoneRedundant": false
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases"
}
Location: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111

Creates a database from PointInTimeRestore.

Sample request

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

{
  "location": "southeastasia",
  "properties": {
    "createMode": "PointInTimeRestore",
    "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SoutheastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
    "restorePointInTime": "2020-10-22T05:35:31.503Z"
  }
}

Sample response

{
  "sku": {
    "name": "Standard",
    "tier": "Standard",
    "capacity": 10
  },
  "kind": "v12.0,user",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 268435456000,
    "status": "Online",
    "databaseId": "2463ef48-53e2-4c26-9781-2d7138080bfd",
    "creationDate": "2020-10-23T20:31:35.807Z",
    "currentServiceObjectiveName": "S0",
    "requestedServiceObjectiveName": "S0",
    "defaultSecondaryLocation": "SoutheastAsia",
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "isInfraEncryptionEnabled": false,
    "zoneRedundant": false,
    "earliestRestoreDate": "2020-10-23T20:47:37Z",
    "readScale": "Disabled",
    "currentSku": {
      "name": "Standard",
      "tier": "Standard",
      "capacity": 10
    },
    "currentBackupStorageRedundancy": "Geo",
    "requestedBackupStorageRedundancy": "Geo",
    "isLedgerOn": false
  },
  "location": "SoutheastAsia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SoutheastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbpitr",
  "name": "dbpitr",
  "type": "Microsoft.Sql/servers/databases"
}
{
  "sku": {
    "name": "Standard",
    "tier": "Standard",
    "capacity": 10
  },
  "kind": "v12.0,user",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 268435456000,
    "status": "Online",
    "databaseId": "2463ef48-53e2-4c26-9781-2d7138080bfd",
    "creationDate": "2020-10-23T20:31:35.807Z",
    "currentServiceObjectiveName": "S0",
    "requestedServiceObjectiveName": "S0",
    "defaultSecondaryLocation": "SoutheastAsia",
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "isInfraEncryptionEnabled": false,
    "zoneRedundant": false,
    "earliestRestoreDate": "2020-10-23T20:47:37Z",
    "readScale": "Disabled",
    "currentSku": {
      "name": "Standard",
      "tier": "Standard",
      "capacity": 10
    },
    "currentBackupStorageRedundancy": "Geo",
    "requestedBackupStorageRedundancy": "Geo",
    "isLedgerOn": false
  },
  "location": "SoutheastAsia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SoutheastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbpitr",
  "name": "dbpitr",
  "type": "Microsoft.Sql/servers/databases"
}
Location: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111

Creates a database with availability zone specified.

Sample request

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

{
  "location": "southeastasia",
  "sku": {
    "name": "S0",
    "tier": "Standard"
  },
  "properties": {
    "createMode": "Default",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 1073741824,
    "availabilityZone": "1"
  }
}

Sample response

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

Creates a database with database-level customer managed keys.

Sample request

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

{
  "identity": {
    "userAssignedIdentities": {
      "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.ManagedIdentity/userAssignedIdentities/umi": {}
    },
    "type": "UserAssigned"
  },
  "location": "southeastasia",
  "sku": {
    "name": "S0",
    "tier": "Standard"
  },
  "properties": {
    "createMode": "Default",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 1073741824,
    "keys": {
      "https://your-key-vault-name.vault.azure.net/yourKey/yourKeyVersion": {},
      "https://your-key-vault-name.vault.azure.net/yourKey2/yourKey2Version": {}
    },
    "encryptionProtector": "https://your-key-vault-name.vault.azure.net/yourKey/yourKeyVersion"
  }
}

Sample response

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

Creates a database with Default enclave type.

Sample request

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

{
  "location": "southeastasia",
  "properties": {
    "preferredEnclaveType": "Default"
  }
}

Sample response

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

Creates a database with default mode.

Sample request

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

{
  "location": "southeastasia",
  "sku": {
    "name": "S0",
    "tier": "Standard"
  },
  "properties": {
    "createMode": "Default",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 1073741824
  }
}

Sample response

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

Creates a database with encryption protector auto rotation.

Sample request

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

{
  "identity": {
    "userAssignedIdentities": {
      "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.ManagedIdentity/userAssignedIdentities/umi": {}
    },
    "type": "UserAssigned"
  },
  "location": "southeastasia",
  "sku": {
    "name": "S0",
    "tier": "Standard"
  },
  "properties": {
    "createMode": "Default",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 1073741824,
    "encryptionProtector": "https://your-key-vault-name.vault.azure.net/yourKey/yourKeyVersion",
    "encryptionProtectorAutoRotation": true
  }
}

Sample response

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

Creates a database with ledger on.

Sample request

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

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

Sample response

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

Creates a database with minimum number of parameters.

Sample request

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

{
  "location": "southeastasia"
}

Sample response

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

Creates a database with preferred maintenance window.

Sample request

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

{
  "location": "southeastasia",
  "sku": {
    "name": "S2",
    "tier": "Standard"
  },
  "properties": {
    "createMode": "Default",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 1073741824,
    "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1"
  }
}

Sample response

{
  "sku": {
    "name": "S2",
    "tier": "Standard"
  },
  "kind": "v12.0,user",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 1073741824,
    "status": "Online",
    "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "currentServiceObjectiveName": "S2",
    "defaultSecondaryLocation": "North Europe",
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "isInfraEncryptionEnabled": false,
    "zoneRedundant": false,
    "earliestRestoreDate": "2020-08-29T06:41:18.283Z",
    "readScale": "Disabled",
    "currentSku": {
      "name": "Standard",
      "tier": "Standard",
      "capacity": 50
    },
    "currentBackupStorageRedundancy": "Geo",
    "requestedBackupStorageRedundancy": "Geo",
    "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1",
    "isLedgerOn": false
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases"
}
{
  "sku": {
    "name": "S2",
    "tier": "Standard"
  },
  "kind": "v12.0,user",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 1073741824,
    "status": "Online",
    "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
    "creationDate": "2017-06-07T04:41:33.937Z",
    "currentServiceObjectiveName": "S2",
    "defaultSecondaryLocation": "North Europe",
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "isInfraEncryptionEnabled": false,
    "zoneRedundant": false,
    "earliestRestoreDate": "2020-08-29T06:41:18.283Z",
    "readScale": "Disabled",
    "currentSku": {
      "name": "Standard",
      "tier": "Standard",
      "capacity": 50
    },
    "currentBackupStorageRedundancy": "Geo",
    "requestedBackupStorageRedundancy": "Geo",
    "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1",
    "isLedgerOn": false
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases"
}
Location: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111

Creates a database with specified backup storage redundancy.

Sample request

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

{
  "location": "southeastasia",
  "properties": {
    "requestedBackupStorageRedundancy": "Zone"
  }
}

Sample response

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

Creates a database with VBS enclave type.

Sample request

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

{
  "location": "southeastasia",
  "properties": {
    "preferredEnclaveType": "VBS"
  }
}

Sample response

{
  "sku": {
    "name": "Standard",
    "tier": "Standard",
    "capacity": 10
  },
  "kind": "v12.0,user",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 268435456000,
    "status": "Online",
    "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
    "currentSku": {
      "name": "Standard",
      "tier": "Standard",
      "capacity": 10
    },
    "creationDate": "2017-06-07T04:41:33.937Z",
    "currentServiceObjectiveName": "S0",
    "currentBackupStorageRedundancy": "Geo",
    "defaultSecondaryLocation": "North Europe",
    "earliestRestoreDate": "2017-06-07T04:51:33.937Z",
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "readScale": "Disabled",
    "requestedBackupStorageRedundancy": "Geo",
    "requestedServiceObjectiveName": "S0",
    "zoneRedundant": false,
    "preferredEnclaveType": "VBS"
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases"
}
{
  "sku": {
    "name": "Standard",
    "tier": "Standard",
    "capacity": 10
  },
  "kind": "v12.0,user",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 268435456000,
    "status": "Online",
    "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
    "currentSku": {
      "name": "Standard",
      "tier": "Standard",
      "capacity": 10
    },
    "creationDate": "2017-06-07T04:41:33.937Z",
    "currentBackupStorageRedundancy": "Zone",
    "currentServiceObjectiveName": "S0",
    "defaultSecondaryLocation": "North Europe",
    "earliestRestoreDate": "2017-06-07T04:51:33.937Z",
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "readScale": "Disabled",
    "requestedBackupStorageRedundancy": "Zone",
    "requestedServiceObjectiveName": "S0",
    "zoneRedundant": false,
    "preferredEnclaveType": "VBS"
  },
  "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"
}
Location: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111

Creates a VCore database by specifying service objective name.

Sample request

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

{
  "location": "southeastasia",
  "sku": {
    "name": "BC",
    "family": "Gen4",
    "capacity": 2
  }
}

Sample response

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

Creates a VCore database by specifying sku name and capacity.

Sample request

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

{
  "location": "southeastasia",
  "sku": {
    "name": "BC_Gen4",
    "capacity": 2
  }
}

Sample response

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

Updates a database to Hyperscale SLO with manual cutover

Sample request

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

{
  "identity": {
    "userAssignedIdentities": {
      "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/userAssignedIdentities/umi": {},
      "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/userAssignedIdentities/umiToDelete": null
    },
    "type": "UserAssigned"
  },
  "location": "southeastasia",
  "sku": {
    "name": "HS_Gen5_2",
    "tier": "Hyperscale"
  },
  "properties": {
    "manualCutover": true
  }
}

Sample response

{
  "sku": {
    "name": "HS_Gen5",
    "tier": "Hyperscale",
    "family": "Gen5",
    "capacity": 2
  },
  "kind": "v12.0,user,vcore",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 34359738368,
    "status": "Online",
    "databaseId": "dad50ee1-9fbb-4fb9-bd2b-5786d175ce3c",
    "creationDate": "2022-12-08T12:41:23.953Z",
    "currentServiceObjectiveName": "GP_Gen5_2",
    "requestedServiceObjectiveName": "HS_Gen5_2",
    "defaultSecondaryLocation": "North Europe",
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "zoneRedundant": false,
    "licenseType": "LicenseIncluded",
    "maxLogSizeBytes": 193273528320,
    "earliestRestoreDate": "2022-12-08T12:42:00Z",
    "readScale": "Enabled",
    "currentSku": {
      "name": "GP_Gen5",
      "tier": "GeneralPurpose",
      "family": "Gen5",
      "capacity": 2
    },
    "currentBackupStorageRedundancy": "Geo",
    "requestedBackupStorageRedundancy": "Geo",
    "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default",
    "isLedgerOn": false,
    "isInfraEncryptionEnabled": false
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases"
}
{
  "sku": {
    "name": "HS_Gen5",
    "tier": "Hyperscale",
    "family": "Gen5",
    "capacity": 2
  },
  "kind": "v12.0,user,vcore",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 34359738368,
    "status": "Online",
    "databaseId": "dad50ee1-9fbb-4fb9-bd2b-5786d175ce3c",
    "creationDate": "2022-12-08T12:41:23.953Z",
    "currentServiceObjectiveName": "GP_Gen5_2",
    "requestedServiceObjectiveName": "HS_Gen5_2",
    "defaultSecondaryLocation": "North Europe",
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "zoneRedundant": false,
    "licenseType": "LicenseIncluded",
    "maxLogSizeBytes": 193273528320,
    "earliestRestoreDate": "2022-12-08T12:42:00Z",
    "readScale": "Enabled",
    "currentSku": {
      "name": "GP_Gen5",
      "tier": "GeneralPurpose",
      "family": "Gen5",
      "capacity": 2
    },
    "currentBackupStorageRedundancy": "Geo",
    "requestedBackupStorageRedundancy": "Geo",
    "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default",
    "isLedgerOn": false,
    "isInfraEncryptionEnabled": false
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases"
}
Location: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111

Updates a database to Hyperscale tier by triggering manual cutover during Migration workflow

Sample request

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

{
  "identity": {
    "userAssignedIdentities": {
      "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/userAssignedIdentities/umi": {},
      "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/userAssignedIdentities/umiToDelete": null
    },
    "type": "UserAssigned"
  },
  "location": "southeastasia",
  "properties": {
    "performCutover": true
  }
}

Sample response

{
  "sku": {
    "name": "HS_Gen5",
    "tier": "Hyperscale",
    "family": "Gen5",
    "capacity": 2
  },
  "kind": "v12.0,user,vcore",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 34359738368,
    "status": "Online",
    "databaseId": "dad50ee1-9fbb-4fb9-bd2b-5786d175ce3c",
    "creationDate": "2022-12-08T12:41:23.953Z",
    "currentServiceObjectiveName": "GP_Gen5_2",
    "requestedServiceObjectiveName": "HS_Gen5_2",
    "defaultSecondaryLocation": "North Europe",
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "zoneRedundant": false,
    "licenseType": "LicenseIncluded",
    "maxLogSizeBytes": 193273528320,
    "earliestRestoreDate": "2022-12-08T12:42:00Z",
    "readScale": "Enabled",
    "currentSku": {
      "name": "GP_Gen5",
      "tier": "GeneralPurpose",
      "family": "Gen5",
      "capacity": 2
    },
    "currentBackupStorageRedundancy": "Geo",
    "requestedBackupStorageRedundancy": "Geo",
    "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default",
    "isLedgerOn": false,
    "isInfraEncryptionEnabled": false
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases"
}
{
  "sku": {
    "name": "HS_Gen5",
    "tier": "Hyperscale",
    "family": "Gen5",
    "capacity": 2
  },
  "kind": "v12.0,user,vcore",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 34359738368,
    "status": "Online",
    "databaseId": "dad50ee1-9fbb-4fb9-bd2b-5786d175ce3c",
    "creationDate": "2022-12-08T12:41:23.953Z",
    "currentServiceObjectiveName": "GP_Gen5_2",
    "requestedServiceObjectiveName": "HS_Gen5_2",
    "defaultSecondaryLocation": "North Europe",
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
    "zoneRedundant": false,
    "licenseType": "LicenseIncluded",
    "maxLogSizeBytes": 193273528320,
    "earliestRestoreDate": "2022-12-08T12:42:00Z",
    "readScale": "Enabled",
    "currentSku": {
      "name": "GP_Gen5",
      "tier": "GeneralPurpose",
      "family": "Gen5",
      "capacity": 2
    },
    "currentBackupStorageRedundancy": "Geo",
    "requestedBackupStorageRedundancy": "Geo",
    "maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default",
    "isLedgerOn": false,
    "isInfraEncryptionEnabled": false
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
  "name": "testdb",
  "type": "Microsoft.Sql/servers/databases"
}
Location: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/databaseOperationResults/11111111-1111-1111-1111-111111111111

Definitions

Name Description
AlwaysEncryptedEnclaveType

Type of enclave requested on the database i.e. Default or VBS enclaves.

AvailabilityZoneType

Specifies the availability zone the database is pinned to.

BackupStorageRedundancy

The storage account type used to store backups for this database.

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.

DatabaseIdentity

Azure Active Directory identity configuration for a resource.

DatabaseIdentityType

The identity type

DatabaseKey

Database level key used for encryption at rest.

DatabaseKeyType

The database key type. Only supported value is 'AzureKeyVault'.

DatabaseLicenseType

The license type to apply for this database. LicenseIncluded if you need a license, or BasePrice if you have a license and are eligible for the Azure Hybrid Benefit.

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. Not applicable to a Hyperscale database within an elastic pool.

DatabaseStatus

The status of the database.

DatabaseUserIdentity

Azure Active Directory identity configuration for a resource.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

FreeLimitExhaustionBehavior

Specifies the behavior when monthly free limits are exhausted for the free database.

AutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month.

BillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be billed.

SampleName

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

SecondaryType

The secondary type of the database if it is a secondary. Valid values are Geo, Named and Standby.

Sku

An ARM Resource SKU.

AlwaysEncryptedEnclaveType

Type of enclave requested on the database i.e. Default or VBS enclaves.

Value Description
Default
VBS

AvailabilityZoneType

Specifies the availability zone the database is pinned to.

Value Description
1
2
3
NoPreference

BackupStorageRedundancy

The storage account type used to store backups for this database.

Value Description
Geo
GeoZone
Local
Zone

CatalogCollationType

Collation of the metadata catalog.

Value Description
DATABASE_DEFAULT
SQL_Latin1_General_CP1_CI_AS

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.

Value Description
Copy
Default
OnlineSecondary
PointInTimeRestore
Recovery
Restore
RestoreExternalBackup
RestoreExternalBackupSecondary
RestoreLongTermRetentionBackup
Secondary

Database

A database resource.

Name Type Description
id

string

Resource ID.

identity

DatabaseIdentity

The Azure Active Directory identity of the database.

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.autoPauseDelay

integer (int32)

Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled

properties.availabilityZone

AvailabilityZoneType

Specifies the availability zone the database is pinned to.

properties.catalogCollation

CatalogCollationType

Collation of the metadata catalog.

properties.collation

string

The collation of the database.

properties.createMode

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 (date-time)

The creation date of the database (ISO8601 format).

properties.currentBackupStorageRedundancy

BackupStorageRedundancy

The storage account type used to store backups for this database.

properties.currentServiceObjectiveName

string

The current service level objective name of the database.

properties.currentSku

Sku

The name and tier of the SKU.

properties.databaseId

string (uuid)

The ID of the database.

properties.defaultSecondaryLocation

string

The default secondary region for this database.

properties.earliestRestoreDate

string (date-time)

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

properties.elasticPoolId

string (arm-id)

The resource identifier of the elastic pool containing this database.

properties.encryptionProtector

string

The azure key vault URI of the database if it's configured with per Database Customer Managed Keys.

properties.encryptionProtectorAutoRotation

boolean

The flag to enable or disable auto rotation of database encryption protector AKV key.

properties.failoverGroupId

string

Failover Group resource identifier that this database belongs to.

properties.federatedClientId

string (uuid)

The Client id used for cross tenant per database CMK scenario

properties.freeLimitExhaustionBehavior

FreeLimitExhaustionBehavior

Specifies the behavior when monthly free limits are exhausted for the free database.

AutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month.

BillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be billed.

properties.highAvailabilityReplicaCount

integer (int32)

The number of secondary replicas associated with the Business Critical, Premium, or Hyperscale edition database that are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool.

properties.isInfraEncryptionEnabled

boolean

Infra encryption is enabled for this database.

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.keys

<string,  DatabaseKey>

The resource ids of the user assigned identities to use

properties.licenseType

DatabaseLicenseType

The license type to apply for this database. LicenseIncluded if you need a license, or BasePrice if you have a license and are eligible for the Azure Hybrid Benefit.

properties.longTermRetentionBackupResourceId

string (arm-id)

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

properties.maintenanceConfigurationId

string

Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur.

properties.manualCutover

boolean

Whether or not customer controlled manual cutover needs to be done during Update Database operation to Hyperscale tier.

This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to Hyperscale tier.

When manualCutover is specified, the scaling operation will wait for user input to trigger cutover to Hyperscale database.

To trigger cutover, please provide 'performCutover' parameter when the Scaling operation is in Waiting state.

properties.maxLogSizeBytes

integer (int64)

The max log size for this database.

properties.maxSizeBytes

integer (int64)

The max size of the database expressed in bytes.

properties.minCapacity

number (double)

Minimal capacity that database will always have allocated, if not paused

properties.pausedDate

string (date-time)

The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready.

properties.performCutover

boolean

To trigger customer controlled manual cutover during the wait state while Scaling operation is in progress.

This property parameter is only applicable for scaling operations that are initiated along with 'manualCutover' parameter.

This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to Hyperscale tier is already in progress.

When performCutover is specified, the scaling operation will trigger cutover and perform role-change to Hyperscale database.

properties.preferredEnclaveType

AlwaysEncryptedEnclaveType

Type of enclave requested on the database i.e. Default or VBS enclaves.

properties.readScale

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. Not applicable to a Hyperscale database within an elastic pool.

properties.recoverableDatabaseId

string (arm-id)

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

properties.recoveryServicesRecoveryPointId

string (arm-id)

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

properties.requestedBackupStorageRedundancy

BackupStorageRedundancy

The storage account type to be used to store backups for this database.

properties.requestedServiceObjectiveName

string

The requested service level objective name of the database.

properties.restorableDroppedDatabaseId

string (arm-id)

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

properties.restorePointInTime

string (date-time)

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

properties.resumedDate

string (date-time)

The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused.

properties.sampleName

SampleName

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

properties.secondaryType

SecondaryType

The secondary type of the database if it is a secondary. Valid values are Geo, Named and Standby.

properties.sourceDatabaseDeletionDate

string (date-time)

Specifies the time that the database was deleted.

properties.sourceDatabaseId

string (arm-id)

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

properties.sourceResourceId

string (arm-id)

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

This property is only supported for DataWarehouse edition and allows to restore across subscriptions.

When sourceResourceId is specified, sourceDatabaseId, recoverableDatabaseId, restorableDroppedDatabaseId and sourceDatabaseDeletionDate must not be specified and CreateMode must be PointInTimeRestore, Restore or Recover.

When createMode is PointInTimeRestore, sourceResourceId must be the resource ID of the existing database or existing sql pool, and restorePointInTime must be specified.

When createMode is Restore, sourceResourceId must be the resource ID of restorable dropped database or restorable dropped sql pool.

When createMode is Recover, sourceResourceId must be the resource ID of recoverable database or recoverable sql pool.

When source subscription belongs to a different tenant than target subscription, “x-ms-authorization-auxiliary” header must contain authentication token for the source tenant. For more details about “x-ms-authorization-auxiliary” header see https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant

properties.status

DatabaseStatus

The status of the database.

properties.useFreeLimit

boolean

Whether or not the database uses free monthly limits. Allowed on one database in a subscription.

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

Sku

The database SKU.

The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the Capabilities_ListByLocation REST API or one of the following commands:

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

object

Resource tags.

type

string

Resource type.

DatabaseIdentity

Azure Active Directory identity configuration for a resource.

Name Type Description
tenantId

string (uuid)

The Azure Active Directory tenant id.

type

DatabaseIdentityType

The identity type

userAssignedIdentities

<string,  DatabaseUserIdentity>

The resource ids of the user assigned identities to use

DatabaseIdentityType

The identity type

Value Description
None
UserAssigned

DatabaseKey

Database level key used for encryption at rest.

Name Type Description
creationDate

string (date-time)

The database key creation date.

subregion

string

Subregion of the server key.

thumbprint

string

Thumbprint of the database key.

type

DatabaseKeyType

The database key type. Only supported value is 'AzureKeyVault'.

DatabaseKeyType

The database key type. Only supported value is 'AzureKeyVault'.

Value Description
AzureKeyVault

DatabaseLicenseType

The license type to apply for this database. LicenseIncluded if you need a license, or BasePrice if you have a license and are eligible for the Azure Hybrid Benefit.

Value Description
BasePrice
LicenseIncluded

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. Not applicable to a Hyperscale database within an elastic pool.

Value Description
Disabled
Enabled

DatabaseStatus

The status of the database.

Value Description
AutoClosed
Copying
Creating
Disabled
EmergencyMode
Inaccessible
Offline
OfflineChangingDwPerformanceTiers
OfflineSecondary
Online
OnlineChangingDwPerformanceTiers
Paused
Pausing
Recovering
RecoveryPending
Restoring
Resuming
Scaling
Shutdown
Standby
Starting
Stopped
Stopping
Suspect

DatabaseUserIdentity

Azure Active Directory identity configuration for a resource.

Name Type Description
clientId

string (uuid)

The Azure Active Directory client id.

principalId

string (uuid)

The Azure Active Directory principal id.

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.

FreeLimitExhaustionBehavior

Specifies the behavior when monthly free limits are exhausted for the free database.

AutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month.

BillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be billed.

Value Description
AutoPause
BillOverUsage

SampleName

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

Value Description
AdventureWorksLT
WideWorldImportersFull
WideWorldImportersStd

SecondaryType

The secondary type of the database if it is a secondary. Valid values are Geo, Named and Standby.

Value Description
Geo
Named
Standby

Sku

An ARM Resource SKU.

Name Type Description
capacity

integer (int32)

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 or edition of the particular SKU, e.g. Basic, Premium.