Online Tutorials & Training Materials | STechies.com
Register Login

Types of locks

|| 0

Types of locks
Stechies

There are 4 type of table locks
S (Shared)
Several users (transactions) can access locked data at the same time in display mode. A request for another shared lock is accepted, even if it comes from another user. An exclusive lock set on an object that already has a shared lock will be rejected.

E (Exclusive)
An exclusive lock protects the locked object against all types of locks from other transactions. Only the same lock owner can reset the lock (accumulate).

X (eXclusive non-cumulative)

Exclusive locks can be requested several times from the same transaction and are processed successively. In contrast, exclusive but not cumulative locks can be called only once from the same transaction. Each further lock request will be rejected.

O (Optimistic)
Optimistic locks initially behave like shared locks and can be converted into exclusive locks. See