CPU Utilization for Azure SQL Database using vCore Purchasing Model

DPA currently collects and displays DTU metrics for Azure SQL Databases. However, if you're using the vCore purchasing model, those metrics are not present and will show as blank in DPA. To get the CPU Utilization metrics for your vCore system, here are some screenshots and queries that you can use as Custom Metrics in DPA. The DMV provides not only database level CPU utilization, but also exposes instance level CPU utilization as well for the times when you have multiple databases on a single server. So check out both metrics and let us know how they work.

Note: these metrics are currently in the backlog for future versions of DPA

Database CPU Utilization - CPU for a single database

Query

SELECT AVG(avg_cpu_percent) AS cpu_percent
FROM sys.dm_db_resource_stats
WHERE end_time >= DATEADD(second, -60, CURRENT_TIMESTAMP)
Metric Definition

Server CPU Utilization - CPU metric for the Server (when you have multiple databases on the server)

Query

SELECT AVG(avg_instance_cpu_percent) AS cpu_percent
FROM sys.dm_db_resource_stats
WHERE end_time >= DATEADD(second, -60, CURRENT_TIMESTAMP)

Metric Definition