nerdexam
Microsoft

DP-300 · Question #54

Hotspot Question You have an Azure SQL database named db1. You need to retrieve the resource usage of db1 from the last week. How should you complete the statement? To answer, select the appropriate…

The correct answer is FROM: sys.resource_stats; start_time >: DATEADD. This question tests knowledge of the Azure SQL Database system catalog view used to monitor resource utilization metrics over time. You must construct a T-SQL query using the correct DMV and time filter to retrieve the past week's resource usage.

Submitted by chen.hong· Mar 6, 2026Monitor, configure, and optimize database resources

Question

Hotspot Question You have an Azure SQL database named db1. You need to retrieve the resource usage of db1 from the last week. How should you complete the statement? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. Answer:

Exhibit

DP-300 question #54 exhibit

Answer Area

  • FROMsys.resource_stats
    sys.dm_db_resource_statssys.dm_exec_requestssys.dm_user_db_resource_governancesys.resource_stats
  • start_time >DATEADD
    DATEADDDATEDIFFDATEPARTTODATETIMEOFFSET

Explanation

This question tests knowledge of the Azure SQL Database system catalog view used to monitor resource utilization metrics over time. You must construct a T-SQL query using the correct DMV and time filter to retrieve the past week's resource usage.

Approach. The correct statement uses the system dynamic management view (DMV) 'sys.dm_db_resource_stats' combined with a WHERE clause filtering 'end_time' to be greater than or equal to DATEADD(day, -7, GETUTCDATE()). The full query would look like: SELECT * FROM sys.dm_db_resource_stats WHERE end_time >= DATEADD(day, -7, GETUTCDATE()). 'sys.dm_db_resource_stats' records CPU, data I/O, log I/O, and memory consumption for Azure SQL Database, retaining data for the past 14 days in 15-second intervals. GETUTCDATE() is used (not GETDATE()) because Azure SQL stores resource stats in UTC time, and DATEADD(day, -7, ...) correctly calculates the 7-day lookback window.

Concept tested. Knowledge of Azure SQL Database system DMVs for resource monitoring, specifically 'sys.dm_db_resource_stats', and correct use of UTC-based date filtering with DATEADD and GETUTCDATE() to query historical performance metrics.

Reference. https://learn.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-db-resource-stats-azure-sql-database

Topics

#Azure SQL resource usage#sys.resource_stats#DMVs#performance monitoring

Community Discussion

No community discussion yet for this question.

Full DP-300 Practice