Sunday 29 June 2014

Types of locks

Types of locks


Shared (S)

Used for operations that do not change or update data (read-only operations), such as a SELECT
statement.

Exclusive (X)

Used for data-modification operations, such as UPDATE, INSERT, or DELETE. This type of lock
ensures that multiple updates cannot be made to the same resource at the same time.

 Update (U)

Used on resources that can be updated. This type of lock prevents a common form of deadlock that
occurs when multiple sessions are reading, locking, and potentially updating resources later.

 Intent (I)

Used to establish a lock hierarchy.

Schema (Sch)

Used when an operation dependent on the schema of a table is being executed.
The two types of schema lock are: Schema stability (Sch-S), Schema modification (Sch-M)

No comments:

Post a Comment