What is cursor stability?

Cursor stability means that DB2 takes a lock on the page the cursor is accessing and releases the lock when the cursor moves to another page.

Showing Answers 1 - 9 of 9 Answers

burelamanohar

  • Feb 6th, 2007
 

DB2 takes a lock on the page that the cursor is accessing and releases it when the cursor moves on to another page.Cursor Stability provids better CONCURRENCY.

  Was this answer useful?  Yes

Cursor stability  isolation level ensures that any row that was changed by an application process cannot be read untill committed by that process. It ensures that the current row of every updatable cursor is not changed by other application process. Rows that were read during a unit of work can be changed by other application process.

  Was this answer useful?  Yes

sintalam4

  • Dec 20th, 2010
 

The Cursor Stability (CS) isolation level is the default isolation level and locks any row on which the cursor is positioned during a unit of work. The lock on the row is held until the next row is fetched or the unit of work is terminated. If a row has been updated, the lock is held until the unit of work is terminated. A unit of work is terminated when either a COMMIT or ROLLBACK statement is executed.

An application using Cursor Stability cannot read uncommitted data. In addition, the application locks the row that has been currently fetched, and no other application can modify the contents of the current row. As the application locks only the row on which the cursor is positioned, two identical queries may still get different results even if they are issued within a unit of work.

When you want the maximum concurrency while seeing only committed data from concurrent applications, choose this isolation level.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions