Internal Locking Architecture

Locks are not on-disk structures. You won’t find a lock field directly on a data page or a table header, and the metadata that keeps track of locks is never written to disk. Locks are internal memory structures–they consume part of the memory used for SQL Server. A lock is identified by lock resource, which is a description of the resource that is locked (a row, index key, page, or table). To keep track of the database, the type of lock, and the information describing the locked resource, each lock requires 64 bytes of memory on a 32-bit system and 128 bytes of memory on a 64-bit system. This 64-byte or 128 byte structure is called a lock block.

Each process holding a lock also must have a lock owner, which represents ...

Get Inside Microsoft® SQL Server™ 2005, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.