Courseiva

DP-300 Practice Question: Monitor, configure, and optimize database resources

You manage an Azure SQL Database that experiences blocking. You need to identify the blocking chain and the T-SQL statements involved in the blocking. Which dynamic management view (DMV) should you query?

⚠ Common exam trap

The trap here is thinking that a single DMV like sys.dm_os_waiting_tasks provides the full T-SQL text, when in fact you need to join multiple DMVs to get both the blocking chain and the statements.

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

✓

sys.dm_exec_requests joined with sys.dm_exec_sql_text and sys.dm_exec_sessions

The most effective way to diagnose blocking in Azure SQL Database is to query sys.dm_exec_requests, which includes the blocking_session_id column. By joining this DMV with sys.dm_exec_sql_text on the sql_handle, you can retrieve the T-SQL text for both the blocking and blocked requests. Adding sys.dm_exec_sessions provides additional context like login name and host. This combination reveals the full blocking chain and the statements involved.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    sys.dm_exec_requests

    Why it's wrong here

    sys.dm_exec_requests returns information about each request that is currently executing, including blocking_session_id, but it does not provide the T-SQL text of the blocking statement. You would need to join it with other DMVs like sys.dm_exec_sql_text to get the query text. However, for a complete blocking chain and the statements, a different DMV is more suitable.

  • ✓

    sys.dm_exec_requests joined with sys.dm_exec_sql_text and sys.dm_exec_sessions

    Why this is correct

    To identify the blocking chain and the T-SQL statements involved, you should query sys.dm_exec_requests to get the blocking_session_id, join it with sys.dm_exec_sql_text to retrieve the SQL text using the sql_handle, and optionally join with sys.dm_exec_sessions for session details. This combination provides the blocking session, the blocked session, and the statements they are executing, giving a complete view of the blocking scenario.

  • ✗

    sys.dm_exec_input_buffer

    Why it's wrong here

    sys.dm_exec_input_buffer returns the input buffer for a given session, which contains the last statement sent by the client. This can be useful for seeing what a session is trying to execute, but it does not provide the blocking chain. It is not designed to show blocking relationships or the full T-SQL text of currently executing statements. Therefore, it is not the correct DMV for this scenario.

  • ✗

    sys.dm_os_waiting_tasks

    Why it's wrong here

    sys.dm_os_waiting_tasks provides information about tasks that are waiting on a resource, including the blocking_session_id and resource description. However, it does not directly return the T-SQL text of the blocking or blocked statements. You would need to join it with other DMVs to get the full picture. It is useful for identifying wait resources but not the complete blocking chain with statements.

About these practice questions

One of 574 original DP-300 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Microsoft exam blueprint

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.