Lock Types
The locking system has four types of locks:
Logical lock
A logical lock is held for the life of a transaction, which ends with a commit, roll back, or transaction abort.
Physical lock
A physical lock is used and released within a transaction. The locking system uses physical locks to synchronize access to resources.
Control
An internal lock type that manages a table while its schema is being changed or loaded. This lock is always a physical lock.
For example, during a data management operation (create/drop table, create/drop index, modify to relocate) an exclusive table control lock is taken. This combination of lock mode (see
Lock Modes) and lock level (see
Lock Levels) ensures that no transaction can read a table while the schema is being changed or loaded, even if the LOCKMODE of the user is set to READLOCK = NOLOCK. Table management operations can be blocked table readers.
Value
An internal lock type. When lock level is ROW or MVCC, a value lock provides protection against phantoms for users with a transaction state of serializable and when checking for duplicate rows in unique indexes with a transaction state of serializable.
Last modified date: 11/09/2022