Personal tools
You are here: Home DB2 How To's What are the DB2 Isolation Levels ?
Navigation
Log in


Forgot your password?
 
Document Actions

What are the DB2 Isolation Levels ?

A brief description of all four isolation levels used by DB2

1. UR - Uncommitted Read


– For read only queries, no record locking
– Will see uncommitted changes by other transactions
– Good for accessing read only tables
– Statements in UR which modify data are upgraded internally to CS

2. CS - Cursor Stability


– Default isolation level
– Locks and unlocks each row, 1 at a time (never has 2 locks at once)
– Guaranteed to only return data which was committed at the time of the
read

3. RS - Read Stability


– Will keep all qualifying rows locked until the transaction is completed
– Does release locks on rows that do not satisfy query predicates
– Use for result set stability or when future actions on returned rows may be taken

4. RR - Repeatable Read


Locks the table within a unit of work. An application can retrieve and operate on rows in the table as many times as needed. However, the entire table is locked, not just the rows that are retrieved. Until the unit of work completes, no other application can update, delete, or insert a row that would affect the table.

Security for databases
Which solution database auditing and protection do you use?









Polls