DP-300 Practice Question: Monitor, configure, and optimize database resources
You are a database administrator for a company that uses Azure SQL Database. You need to configure a diagnostic setting to send database metrics to a Log Analytics workspace for long-term analysis. The solution should be cost-effective and include metrics like CPU percentage, data IO, and log IO. What should you do?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
In the Azure portal, add a diagnostic setting for the database to stream 'AllMetrics' to a Log Analytics workspace.
Diagnostic settings in the Azure portal allow streaming of platform metrics (including 'AllMetrics' for CPU percentage, data IO, log IO) to a Log Analytics workspace cost-effectively. Option A is incorrect because Azure SQL Insights is a paid, advanced monitoring solution that is not necessary for basic metric streaming. Option B is incorrect because Query Store captures query performance data, not resource metrics, and cannot export directly to Log Analytics. Option D is incorrect because manually inserting from sys.dm_db_resource_stats via a T-SQL job is inefficient, not built-in, and lacks the integration of diagnostic settings.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Enable Azure SQL Insights (preview) for the database.
Why it's wrong here
Azure SQL Insights is a paid monitoring solution that includes additional costs.
- ✗
Enable Query Store and configure it to export to Log Analytics.
Why it's wrong here
Query Store does not export to Log Analytics directly.
- ✓
In the Azure portal, add a diagnostic setting for the database to stream 'AllMetrics' to a Log Analytics workspace.
Why this is correct
Diagnostic settings can stream metrics to Log Analytics for cost-effective long-term analysis.
- ✗
Create a T-SQL job that periodically inserts sys.dm_db_resource_stats into a table in Log Analytics.
Why it's wrong here
This is complex and not recommended; Log Analytics has direct ingestion.
Go deeper
Related to this question
Learn chapter
Overview of Azure Data Platform Options
Key term
Query Store
Query Store is a built-in SQL Server feature that captures and stores a history of query execution plans and performance data for easy monitoring and troubleshooting.
Key term
Azure SQL Performance Tuning
Azure SQL Performance Tuning is the process of optimizing the speed and efficiency of queries and database operations in Microsoft Azure SQL Database or SQL Managed Instance to reduce latency and improve throughput.
About these practice questions
This DP-300 question is part of Courseiva's 906-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DP-300 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DP-300 exam.