Databases - Pause

Pauses a database.

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

URI Parameters

Name In Required Type Description
subscriptionId
path True
  • string

The subscription ID that identifies an Azure subscription.

resourceGroupName
path True
  • string

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

serverName
path True
  • string

The name of the server.

databaseName
path True
  • string

The name of the database to be paused.

api-version
query True
  • string

The API version to use for the request.

Responses

Name Type Description
200 OK

Successfully paused the database.

202 Accepted

Pausing the database is in progress.

Other Status Codes

*** Error Responses: ***

  • 400 CannotDeactivateWhenDeactivatingInProgress - Deactivation workflow failed because there is a deactivate workflow already running.

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

  • 404 SourceDatabaseNotFound - The source database does not exist.

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

Examples

Pauses a database.

Sample Request

POST https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdwdb/pause?api-version=2017-10-01-preview

Sample Response

{
  "sku": {
    "name": "DW100",
    "tier": "DataWarehouse"
  },
  "kind": "v12.0,user,datawarehouse",
  "properties": {
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "maxSizeBytes": 10995116277760,
    "status": "Paused",
    "databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
    "creationDate": "2017-07-13T02:04:26.187Z",
    "currentServiceObjectiveName": "D1",
    "defaultSecondaryLocation": "North Europe",
    "catalogCollation": "SQL_Latin1_General_CP1_CI_AS"
  },
  "location": "southeastasia",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdwdb",
  "name": "testdwdb",
  "type": "Microsoft.Sql/servers/databases"
}

Definitions

CatalogCollationType

Collation of the metadata catalog.

CreateMode

Specifies the mode of database creation.

Default: regular database creation.

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

Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as the resource ID of the existing primary database.

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

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

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

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

Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition.

Database

A database resource.

DatabaseLicenseType

The license type to apply for this database.

DatabaseReadScale

If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases.

DatabaseStatus

The status of the database.

SampleName

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

Sku

An ARM Resource SKU.

CatalogCollationType

Collation of the metadata catalog.

Name Type Description
DATABASE_DEFAULT
  • string
SQL_Latin1_General_CP1_CI_AS
  • string

CreateMode

Specifies the mode of database creation.

Default: regular database creation.

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

Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as the resource ID of the existing primary database.

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

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

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

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

Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition.

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

Database

A database resource.

Name Type Description
id
  • string

Resource ID.

kind
  • string

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

location
  • string

Resource location.

managedBy
  • string

Resource that manages the database.

name
  • string

Resource name.

properties.autoPauseDelay
  • integer

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

properties.catalogCollation

Collation of the metadata catalog.

properties.collation
  • string

The collation of the database.

properties.createMode

Specifies the mode of database creation.

Default: regular database creation.

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

Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as the resource ID of the existing primary database.

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

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

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

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

Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition.

properties.creationDate
  • string

The creation date of the database (ISO8601 format).

properties.currentServiceObjectiveName
  • string

The current service level objective name of the database.

properties.currentSku

The name and tier of the SKU.

properties.databaseId
  • string

The ID of the database.

properties.defaultSecondaryLocation
  • string

The default secondary region for this database.

properties.earliestRestoreDate
  • string

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

properties.elasticPoolId
  • string

The resource identifier of the elastic pool containing this database.

properties.failoverGroupId
  • string

Failover Group resource identifier that this database belongs to.

properties.licenseType

The license type to apply for this database.

properties.longTermRetentionBackupResourceId
  • string

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

properties.maxLogSizeBytes
  • integer

The max log size for this database.

properties.maxSizeBytes
  • integer

The max size of the database expressed in bytes.

properties.minCapacity
  • number

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

properties.pausedDate
  • string

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

properties.readReplicaCount
  • integer

The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases.

properties.readScale

If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases.

properties.recoverableDatabaseId
  • string

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

properties.recoveryServicesRecoveryPointId
  • string

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

properties.requestedServiceObjectiveName
  • string

The requested service level objective name of the database.

properties.restorableDroppedDatabaseId
  • string

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

properties.restorePointInTime
  • string

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

properties.resumedDate
  • string

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

properties.sampleName

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

properties.sourceDatabaseDeletionDate
  • string

Specifies the time that the database was deleted.

properties.sourceDatabaseId
  • string

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

properties.status

The status of the database.

properties.zoneRedundant
  • boolean

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

sku

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

DatabaseLicenseType

The license type to apply for this database.

Name Type Description
BasePrice
  • string
LicenseIncluded
  • string

DatabaseReadScale

If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases.

Name Type Description
Disabled
  • string
Enabled
  • string

DatabaseStatus

The status of the database.

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

SampleName

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

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

Sku

An ARM Resource SKU.

Name Type Description
capacity
  • integer

Capacity of the particular SKU.

family
  • string

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

name
  • string

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

size
  • string

Size of the particular SKU

tier
  • string

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