Suppose I have 3 queries all run in SSMS in this order
(1) select * from MainTableA
(2) truncate table MainTableA
(3) select name from MainTableA (nolock) where Id=1
Before (1) is finished (2) starts and, before (2) is finished, but after it starts, (3) starts.
(1) takes a table IS lock on MainTableA
(2) waits for a Sch-M table lock on MainTableA and is blocked by (1)
(3) waits for a Sch-S lock on MainTableA and is blocked by (2)
Why is (3) blocked by (2)? Since a Sch-S lock is compatible with an IS lock and (2) hasn't acquired it's lock yet, shouldn't (3) proceed? The blocking chain shows (2) is blocked by (1) and (3) is blocked by (2), but I'm not understanding why (2) can block (3) when it hasn't acquired the lock yet.