DP-300 · Question #1
Case Study 1 - Litware, Inc Overview Litware, Inc. is a renewable energy company that has a main office in Boston. The main office hosts a sales department and the primary datacenter for the…
The correct answer is C. sys.dm_exec_requests F. sys.dm_tran_locks. SalesSQLDb1 experiences performance issues that are likely due to out-of-date statistics and frequent blocking queries. Seeing a Count of All Active SQL Server Wait Types. Sometimes we're trying to diagnose a problem and we want to know if we're seeing a large number of wait…
Question
Options
- Asys.dm_pdw_nodes_tran_locks
- Bsys.dm_exec_compute_node_errors
- Csys.dm_exec_requests
- Dsys.dm_cdc_errors
- Esys.dm_pdw_nodes_os_wait_stats
- Fsys.dm_tran_locks
How the community answered
(43 responses)- A5% (2)
- B5% (2)
- C56% (24)
- D23% (10)
- E12% (5)
Explanation
SalesSQLDb1 experiences performance issues that are likely due to out-of-date statistics and frequent blocking queries. Seeing a Count of All Active SQL Server Wait Types. Sometimes we're trying to diagnose a problem and we want to know if we're seeing a large number of wait types occurring. We can do this using sys.dm_exec_requests because the current wait type being experienced is presented. Therefore, if we filter out any background or sleeping tasks, we can get a picture of what the waits are for active requests and we can also see if we have a problem. Here's the query: SELECT COALESCE(wait_type, 'None') AS wait_type, COUNT(*) AS Total FROM sys.dm_exec_requests - WHERE NOT status IN ('Background', 'Sleeping') GROUP BY wait_type ORDER BY Total DESC; Here is an example of the query output: We see that we have two LCK_M_S wait types. This is the wait type we get when we have requests waiting on obtaining a shared lock. We can then query along with sys.dm_tran_locks to determine what types of locks these active requests were trying to obtain: SELECT L.request_session_id, L.resource_type,L.resource_subtype, L.request_mode, FROM sys.dm_tran_locks AS L JOIN sys.dm_exec_requests AS DER ON L.request_session_id = DER.session_id WHERE DER.wait_type = 'LCK_M_S'; Not A: Azure SQL database does not have sys.dm_pdw_nodes_tran_locks. Not E: Azure SQL database does not have sys.dm_pdw_nodes_os_wait_stats. sysdmexecrequests/
Community Discussion
No community discussion yet for this question.