DP-300 · Question #12
You have SQL Server on an Azure virtual machine that contains a database named DB1. You have an application that queries DB1 to generate a sales report. You need to see the parameter values from the…
The correct answer is B. Enable Lightweight_Query_Profiling in DB1 C. Enable Last_Query_Plan_Stats in DB1. LAST_QUERY_PLAN_STATS works under the lightweight query execution statistics profiling infrastructure, so we need to ensure both Last_Query_Plan_Stats Lightweight_Query_Profiling is on at database scope (though Lightweight_Query_Profiling is default on at SQL2019 but it can be…
Question
Options
- AEnable Last_Query_Plan_Stats in the master database
- BEnable Lightweight_Query_Profiling in DB1
- CEnable Last_Query_Plan_Stats in DB1
- DEnable Lightweight_Query_Profiling in the master database
- EEnable PARAMETER_SNIFFING in DB1
How the community answered
(52 responses)- A10% (5)
- B71% (37)
- D4% (2)
- E15% (8)
Explanation
LAST_QUERY_PLAN_STATS works under the lightweight query execution statistics profiling infrastructure, so we need to ensure both Last_Query_Plan_Stats Lightweight_Query_Profiling is on at database scope (though Lightweight_Query_Profiling is default on at SQL2019 but it can be turned off as well). https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management- views/sys-dm-exec-query-plan-stats-transact-sql?view=sql-server-ver15
Community Discussion
No community discussion yet for this question.