Row identifier. Used to lock a single row within a table. 行标识。当为单行数据加锁时使用。
Row lock within an index. Used to protect key ranges in serializable transactions.
8 kilobyte –(KB) data page or index page. 页——8KB大小，SQL Server存储的基础数据结构。数据页，或者索引页。
Contiguous group of eight data pages or index pages. 区，连续8个页称为一个区。
Entire table, including all data and indexes. 表，包括数据和索引。
SQL Server 针对不同类型的资源，选择不同级别的锁。锁的级别不同，决定了事务并发时怎样获取到这些资源。
SQL Server 有下面几种级别的锁。
Shared (S) 共享锁
Used for operations that do not change or update data (read-only operations), such as a SELECT statement.
Update (U) 更新锁
Used on resources that can be updated. Prevents a common form of deadlock that occurs when multiple sessions are reading, locking, and potentially updating resources later.
Exclusive (X) 排他锁
Used for data-modification operations, such as INSERT, UPDATE, or DELETE. Ensures that multiple updates cannot be made to the same resource at the same time.
用于数据修改操作，比如INSERT, UPDATE, 或者 DELETE。确保多个更新操作不会在同一时间操作于同一资源。
Used to establish a lock hierarchy. The types of intent locks are: intent shared (IS), intent exclusive (IX), and shared with intent exclusive (SIX).
Used when an operation dependent on the schema of a table is executing. The types of schema locks are: schema modification (Sch-M) and schema stability (Sch-S).
Bulk Update (BU)
Used when bulk-copying data into a table and the TABLOCK hint is specified.
Intent locks include intent shared (IS), intent exclusive (IX), and shared with intent exclusive (SIX).
Intent shared (IS)
Indicates the intention of a transaction to read some (but not all) resources lower in the hierarchy by placing S locks on those individual resources.
Intent exclusive (IX)
Indicates the intention of a transaction to modify some (but not all) resources lower in the hierarchy by placing X locks on those individual resources. IX is a superset of IS.
Shared with intent exclusive (SIX)
Indicates the intention of the transaction to read all of the resources lower in the hierarchy and modify some (but not all) resources lower in the hierarchy by placing IX locks on those individual resources. Concurrent IS locks at the top-level resource are allowed. For example, an SIX lock on a table places an SIX lock on the table (allowing concurrent IS locks), and IX locks on the pages being modified (and X locks on the modified rows). There can be only one SIX lock per resource at one time, preventing updates to the resource made by other transactions, although other transactions can read resources lower in the hierarchy by obtaining IS locks at the table level.
Schema modification (Sch-M) locks are used when a table data definition language (DDL) operation (such as adding a column or dropping a table) is being performed.
Schema stability (Sch-S) locks are used when compiling queries. Schema stability (Sch-S) locks do not block any transactional locks, including exclusive (X) locks. Therefore, other transactions can continue to run while a query is being compiled, including transactions with exclusive (X) locks on a table. However, DDL operations cannot be performed on the table.
Bulk update (BU) locks are used when bulk copying data into a table and either the TABLOCK hint is specified or the table lock on bulk load table option is set using sp_tableoption. Bulk update (BU) locks allow processes to bulk copy data concurrently into the same table while preventing other processes that are not bulk copying data from accessing the table.