Courseiva
Plan and implement data platform resourceshardMultiple ChoiceObjective-mapped

DP-300 Plan and implement data platform resources Practice Question

You have an Azure SQL Database with Query Store enabled. You notice that a critical stored procedure has regressed in performance. You need to force a previous, better-performing execution plan for that query. What should you do?

⚠ Common exam trap

Candidates often confuse the DMV for recommendations (`sys.dm_db_tuning_recommendations`) with the actual stored procedure to enforce a plan, or they think resetting Query Store is a valid troubleshooting step when it actually destroys historical data.

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

Execute sys.sp_query_store_force_plan with the query_id and plan_id.

`sys.sp_query_store_force_plan` is the dedicated system stored procedure in Azure SQL Database that forces the Query Store to use a specific execution plan for a given query. When a stored procedure's performance regresses, you identify the query_id and plan_id of the better-performing plan from Query Store views and execute this procedure to pin that plan, overriding the optimizer's choice.

Answer analysis

Option-by-option breakdown

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

  • Disable and re-enable Query Store to reset the plans.

    Why it's wrong here

    This does not force a specific plan and loses historical data.

  • Execute sys.sp_query_store_set_hints to add a query hint.

    Why it's wrong here

    This sets hints, not forces a plan.

  • Use sys.dm_db_tuning_recommendations to apply a plan.

    Why it's wrong here

    This DMV provides recommendations, but does not force a plan.

  • Execute sys.sp_query_store_force_plan with the query_id and plan_id.

    Why this is correct

    Forces Query Store to use a specific plan.

Go deeper

Related to this question

About these practice questions

Courseiva writes every DP-300 question from scratch — 906 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.