Previous Topic: Types of LocksNext Topic: Area Locking for SQL Transactions


Logical Area Locks

Effect of Ready Mode

To control concurrent access to areas within a central version, the mode in which an area is readied is translated into a logical lock on the area. As an area is readied, CA IDMS/DB attempts to place an appropriate lock based on the ready mode. If the new lock doesn't conflict with locks already held by other transactions, access is granted to the area. If a conflict exists, the transaction is placed in a wait state until the conflicting locks are released.

Area Lock Depends on Area Ready Mode

The type of lock (lock mode) placed on an area depends on the mode in which the area is being readied:

Ready mode

Lock mode

Transient retrieval

Intent Share (NL)

Shared retrieval

Intent Share (IS)

Shared update

Intent Exclusive (IX)

Protected retrieval

Share (S)

Protected update

Update Intent Exclusive (UIX)

Exclusive retrieval

Exclusive (X)

Exclusive update

Exclusive (X)

When Area Locks are Acquired

For transactions initiated through navigational DML, CA IDMS/DB acquires area locks when either of the following occur:

For SQL-initiated transactions, when area locks are acquired depends on the area acquisition mode specified within an access module or in effect for dynamic SQL.

Note: For more information, see 39.4.4, “Area Locking for SQL Transactions".

Area Acquisition Threshold

If a transaction is locking multiple areas at one time, and must wait to place a lock on one of the areas, CA IDMS/DB releases the locks on all other areas before placing the transaction in a wait state. This helps to avoid deadlocks between two or more transactions trying to gain access to areas. However, it also means that another transaction can gain access to an area whose lock was released by the waiting transaction. To avoid this pre-emption, you can specify an area acquisition threshold at system generation that limits the number of times a transaction will wait on an area lock before it no longer releases other area locks.