SQL/MX 2.x Reference Manual (H06.04+)

Introduction
HP NonStop SQL/MX Reference Manual540440-003
1-9
STABLE
STABLE
For nonaudited tables, access becomes READ COMMITTED.
This option locks all data accessed through the DML statement but releases locks on
unmodified data as soon as possible, which enables concurrent use of the database.
STABLE access locks modified data in audited tables until the end of the transaction.
STABLE is not available for DML statements that modify the database. It is available
only for a SELECT statement.
In host programs that use cursors, STABLE locks an unmodified row only when the
row is in the current position and releases the lock at the next FETCH that fills the
buffer.
You can control the number of rows read into this buffer with the
MAX_ROWS_LOCKED_FOR_STABLE_ACCESS system default attribute. The default
is one row, and the maximum number of rows depends on the size of the buffer. To
increase concurrency, you can decrease this value so that more messages are used to
return the same amount of data.
CLOSE cursor-name releases the lock from the last FETCH.
STABLE is available only with updatable cursors. If a SELECT statement cannot be
completed, access becomes READ COMMITTED.
For modified rows in audited tables, STABLE access uses exclusive locks held by the
TMF transaction that are released only when the entire transaction ends.
STABLE access provides sufficient consistency for any process that does not require a
repeatable read capability.