Wednesday 28 October 2015

DB2 Isolation levels

UR (Uncommitted Read) : 
  
  - For read only queries. 
  - No record locking. 
  - Good for accessing read only tables.

CS (Cursor Stability) :

- Default isolation level. 
- It locks and unlocks each row , 1 at a time. 
- Guaranteed to only return the data which was committed at the time of read

RS (Read Stability):

- Keeps all the qualifying rows locked until the transaction is complete.
- Releases the lock on those rows which doesn't satisfy the query

RR (Repeatable Read):

- Not just the rows that satisfy the query, but keeps the entire table locked until  the unit   of work is done.
- No other application program can update, insert or delete the row from the  table.