Courseiva

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

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 →

How Courseiva writes practice questions · Editorial policy

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.