Which two dynamic management views should you use?

Posted by: Pdfprep Category: DP-300 Tags: , ,

D18912E1457D5D1DDCBD40AB3BF70D5D

You need to identify the cause of the performance issues on SalesSQLDb1.

Which two dynamic management views should you use? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.
A . sys.dm_pdw_nodes_tran_locks
B . sys.dm_exec_compute_node_errors
C . sys.dm_exec_requests
D . sys.dm_cdc_errors
E . sys.dm_pdw_nodes_os_wait_stats
F . sys.dm_tran_locks

Answer: A,E

Explanation:

SalesSQLDb1 experiences performance issues that are likely due to out-of-date statistics and frequent blocking queries.

A: Use sys.dm_pdw_nodes_tran_locks instead of sys.dm_tran_locks from Azure Synapse

Analytics (SQL Data Warehouse) or Parallel Data Warehouse.

E: Example:

The following query will show blocking information.

SELECT

t1.resource_type,

t1.resource_database_id,

t1.resource_associated_entity_id,

t1.request_mode,

t1.request_session_id,

t2.blocking_session_id

FROM sys.dm_tran_locks as t1

INNER JOIN sys.dm_os_waiting_tasks as t2

ON t1.lock_owner_address = t2.resource_address;

Note: Depending on the system you’re working with you can access these wait statistics from one of three locations:

sys.dm_os_wait_stats: for SQL Server

sys.dm_db_wait_stats: for Azure SQL Database

sys.dm_pdw_nodes_os_wait_stats: for Azure SQL Data Warehouse

Reference: https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-tran-locks-transact-sql

Leave a Reply

Your email address will not be published.