SQL Server Interview Question #250

What are intent locks?

Advanced Transactions & Concurrency Senior Advanced

Detailed Explanation

Intent locks indicate that SQL Server holds or intends to acquire more granular locks lower in the locking hierarchy.

Examples include Intent Shared (IS), Intent Exclusive (IX), and Shared with Intent Exclusive (SIX). They allow SQL Server to determine lock compatibility efficiently without examining every row or page lock when another session requests a higher-level lock.

Intent locks are normal parts of SQL Server's hierarchical locking architecture.