SQL Database Blocking and RCSI in Microsoft Fabric

Optimize database performance
Answer Statement 1: Yes. Statement 2: No. Statement 3: No.

HOTSPOT You have a SQL database in Microsoft Fabric that uses the default settings for a newly created database and contains a table named Sales.Orders. You have an application that uses two stored procedures to access Sales.Orders. While monitoring database activity, you discover the following: • sys.dm_exec_requests shows multiple sessions in a suspended state with wait_type = LCK_M_X. All the sessions show the same wait_resource, which maps to Sales.Orders, and the same nonzero blocking_session_id. • sys.dm_exec_input_buffer(blocking_session_id, NULL) returns a last submitted command of BEGIN TRANSACTION UPDATE Sales.Orders. • sys.dm_exec_sessions for the blocking session shows status = sleeping and open_transaction_count = 1. For each of the following statements, select Yes if the statement is true. Otherwise, select No. NOTE: Each correct selection is worth one point. exhibit

Community Insight

The key trap is assuming standard locking behavior; with RCSI enabled by default, readers use row versioning and do not acquire shared locks, preventing read-write blocking.

This scenario analyzes a blocking chain in Microsoft Fabric SQL using DMVs, leveraging Read Committed Snapshot Isolation (RCSI) to determine that SELECT statements are not blocked by UPDATE transactions.

Learners often incorrectly assume that any active transaction holding an exclusive lock will block concurrent SELECT queries, failing to account for the snapshot isolation features inherent in Azure SQL/Fabric.

Community Discussion (4 comments)

BozaXephon 👍 2
Yes, No, No
BozaXephon 👍 1
Statement 1: The blocking is caused by an uncommitted explicit transaction in the blocking session that is holding locks. Answer: Yes Explanation: The blocking session exhibits open_transaction_count = 1, a status of sleeping, and a last command starting with BEGIN TRANSACTION. This indicates that an explicit transaction was opened and modified data but was never closed with a COMMIT or ROLLBACK, leaving exclusive locks active on Sales.Orders.
BozaXephon 👍 1
Statement 2: While an UPDATE operation on Sales.Orders is occurring, SELECT statements will be blocked. Answer: No Explanation: SQL Database in Microsoft Fabric (and Azure SQL Database) operates with Read Committed Snapshot Isolation (RCSI) enabled by default. Under RCSI, read operations (SELECT) use row-versioning to retrieve a consistent snapshot of the data without requesting shared locks, preventing SELECT statements from being blocked by concurrent UPDATE locks
BozaXephon 👍 1
Statement 3: Joining sys.dm_tran_locks to sys.dm_exec_requests will show which session holds locks involved in the blocking chain. Answer: No Explanation: The blocking session is in a sleeping state because it is waiting for client interaction (or a commit) while holding locks; it is not currently executing an active request. Because sys.dm_exec_requests only tracks sessions with active, running requests, joining sys.dm_tran_locks to sys.dm_exec_requests will omit the sleeping blocking session. To identify the lock holder, sys.dm_tran_locks should instead be joined with sys.dm_exec_sessions.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

Statement 1 is Yes because the blocking session has open_transaction_count = 1 and status sleeping, indicating an uncommitted explicit transaction holding locks. Statement 2 is No because Microsoft Fabric (Azure SQL Database) enables Read Committed Snapshot Isolation (RCSI) by default, allowing SELECTs to use row versions instead of acquiring shared locks. Statement 3 is No because sys.dm_exec_requests only tracks sessions with active requests; a sleeping session is not currently executing, so it won't appear there as the blocker.

Why Other Candidate Answers Are Wrong

Selecting 'Yes' for Statement 2 ignores the fundamental change in locking behavior introduced by RCSI. Selecting 'Yes' for Statement 3 misunderstands the scope of sys.dm_exec_requests, which filters out sleeping sessions regardless of their lock-holding status.

Community Comment Notes

As BozaXephon noted, the explanation correctly identifies that RCSI prevents read-write blocking. The community consensus aligns with the verdict: Yes, No, No.

Exam Strategy

Always check if the environment uses RCSI or SI before assuming blocking occurs between reads and writes. Understand that 'sleeping' sessions hold locks but do not appear in request-based monitoring views.

Frequently Asked Questions

Why does RCSI prevent SELECT from being blocked?

RCSI uses row versioning to provide a consistent snapshot for readers, eliminating the need for shared locks that would conflict with exclusive write locks.

How to identify a sleeping session causing blocking?

Check sys.dm_exec_sessions for open_transaction_count > 0 and status = sleeping, then link via blocking_session_id in sys.dm_exec_requests.

More DP-800 FAQ →

Related Analysis

← Back to DP-800 Study Guide