Database Reference
In-Depth Information
Figure 19-3. Deadlock due to the scans, Step 1
At this point, both sessions hold exclusive (X) locks on the updated rows. As the second step both sessions run
the select statements based on the CustomerId filter. As you remember, there are no non-clustered indexes on the
table and you will have clustered index scan in the execution plan. In READ COMMITTED transaction isolation level,
SQL Server acquires shared (S) locks when reading the data and as result, both sessions would be blocked as soon as
they would try to read the row with exclusive (X) locks held by another session, as shown in Figure 19-4 .
Search WWH ::




Custom Search