Enhanced transaction support for updatable cursors

Transaction support in server versions earlier than 15.7

In versions earlier than 15.7, Adaptive Server closes a cursor declared with a for update clause and opened within a transaction context, if

See “Using select for update in cursors and DML”.

Transaction support in server version 15.7 and later

In version 15.7 and later, and when select for update is set, Adaptive Server supports fetch operations on open cursors after the transaction has been committed.

When you open a cursor, Adaptive Server uses different locking mechanisms based on the transaction mode:

When you execute a commit between two fetch commands, or between closing and reopening a cursor, Adaptive Server releases all exclusive locks. For subsequent fetch commands, Adaptive Server acquires locks based on the transaction mode:

If update row locks are acquired, Adaptive Server releases them only when: