Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to:
Azure SQL Database
You can view the history of pause and resume events for a serverless database.
- To monitor pause and resume events for a serverless database, use the Activity log in the Azure portal, PowerShell, and Azure CLI.
- For general information about monitoring your Azure SQL Database, see Monitor and performance tuning, Database watcher (preview), and Monitor using DMVs.
Resources used and billed
The resources of a serverless database include the app package, SQL logical server, and user resource pool entities.
App package
The app package is the outermost resource management boundary for a database, regardless of whether the database is in a serverless or provisioned compute tier. The app package contains the SQL Database Engine and external services like Full-text Search that all together scope all user and system resources used by Azure SQL Database. The SQL Database Engine generally dominates the overall resource utilization across the app package.
User resource pool
The user resource pool is an inner resource management boundary for a database, regardless of whether the database is in a serverless or provisioned compute tier. The user resource pool scopes CPU and IO for user workload generated by DDL (CREATE and ALTER) and DML (INSERT, UPDATE, DELETE, MERGE, and SELECT) queries. These queries generally represent the most substantial proportion of utilization within the app package.
Metrics
The following table includes metrics for monitoring the resource usage of the app package and user resource pool of a serverless database, including any geo-replicas:
| Entity | Metric | Description | Units |
|---|---|---|---|
| App package | app_cpu_percent |
Percentage of vCores used by the app relative to maximum vCores allowed for the app. For serverless Hyperscale, this metric is exposed for all primary replicas, named replicas, and geo-replicas. | Percentage |
| App package | app_cpu_billed |
The amount of compute billed for the app during the reporting period. The amount paid during this period is the product of this metric and the vCore unit price. Values of this metric are determined by aggregating the maximum of CPU used and memory used each second. If the amount used is less than the minimum amount provisioned as set by the minimum vCores and minimum memory, the minimum amount provisioned is billed. In order to compare CPU with memory for billing purposes, memory is normalized into units of vCores by rescaling the amount of memory in GB by 3 GB per vCore. For serverless Hyperscale, this metric is exposed for the primary replica and any named replicas. |
vCore seconds |
| App package | app_cpu_billed_HA_replicas |
Only applicable to serverless Hyperscale. Sum of the compute billed across all apps for HA replicas during the reporting period. This sum is scoped either to the HA replicas belonging to the primary replica or the HA replicas belonging to a given named replica. Before calculating this sum across HA replicas, the amount of compute billed for an individual HA replica is determined in the same way as for the primary replica or a named replica. For serverless Hyperscale, this metric is exposed for all primary replicas, named replicas, and geo-replicas. The amount paid during the reporting period is the product of this metric and the vCore unit price. | vCore seconds |
| App package | app_memory_percent |
Percentage of memory used by the app relative to maximum memory allowed for the app. For serverless Hyperscale, this metric is exposed for all primary replicas, named replicas, and geo-replicas. | Percentage |
| User resource pool | cpu_percent |
Percentage of vCores used by user workload relative to maximum vCores allowed for user workload. | Percentage |
| User resource pool | data_IO_percent |
Percentage of data IOPS used by user workload relative to maximum data IOPS allowed for user workload. | Percentage |
| User resource pool | log_IO_percent |
Percentage of log MB/s used by user workload relative to maximum log MB/s allowed for user workload. | Percentage |
| User resource pool | workers_percent |
Percentage of workers used by user workload relative to maximum workers allowed for user workload. | Percentage |
| User resource pool | sessions_percent |
Percentage of sessions used by user workload relative to maximum sessions allowed for user workload. | Percentage |
Monitor pause and resume status
For a serverless database with auto-pausing enabled, the reported status includes the following values:
| Status | Description |
|---|---|
| Online | The database is online. |
| Pausing | The database is transitioning from online to paused. |
| Paused | The database is paused. |
| Resuming | The database is transitioning from paused to online. |
Use Azure portal
In the Azure portal, you can see the database status on the Overview page of the database and on the Overview page of its server. Also in the Azure portal, you can view the history of pause and resume events for a serverless database in the Activity log.
Use PowerShell
View the current database status by using the following PowerShell example:
$params = @{
ResourceGroupName = $resourcegroupname
ServerName = $servername
DatabaseName = $databasename
}
Get-AzSqlDatabase @params | Select-Object -ExpandProperty "Status"
Use Azure CLI
View the current database status by using the following Azure CLI example:
$resourceGroupName = "<resource group name>"
$serverName = "<logical SQL server name>"
$databaseName = "<database name>"
az sql db show --name $databasename `
--resource-group $resourcegroupname `
--server $servername `
--query 'status' `
-o json