Try OpenEdge Now
skip to main content
SQL Development
Data Control Language and Transaction Behavior : Understanding transactions and locking : Lock modes
 

Lock modes

Lock modes are prioritized tokens in a queue that indicate what action is being taken in the transaction process. For instance, intent to update a record requires a different mode of lock than to actually update it. Lock modes facilitate concurrency and provide consistency. They indicate intent and are used to stage lock requests. Lock requests are generated as a result of the execution of a transaction.
OpenEdge provides the following lock modes:
*NO-LOCK (NL) — You have no intention of performing an update, and accuracy of the resulting set of data is not important.
*INTENT SHARE (IS) — You intend to share-lock objects at the next lower level of granularity for this object (table). That is, you intend to get share locks on the rows of this table.
*INTENT EXCLUSIVE (IX) — You intend to exclusive-lock objects at the next lower level of granularity for this object (table). That is, you intend to get exclusive locks on the rows of this table.
*SHARED (S) — You want a share-lock on the object. Getting a share-lock on an object means that you implicitly get a share-lock on all of the objects that this object contains, that is, all of the rows for this table.
*SHARED WITH INTENT EXCLUSIVE (SIX) — You want a share-lock on the table so no one else can modify, delete, or add rows except you.
*EXCLUSIVE (X) — You want an exclusive-lock on the object. Getting an exclusive lock on an object means that you implicitly get an exclusive lock on all of the objects that this object contains, that is, all of the rows for this table.