If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Isolation Levels

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-10-06, 09:28
vigneshch vigneshch is offline
Registered User
 
Join Date: Nov 2006
Posts: 4
Isolation Levels

What R Isolation Levels & How We Havw To Apply Them On Any Application Transaction
Regards.
Vignesh
Reply With Quote
  #2 (permalink)  
Old 11-10-06, 22:13
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Isolation Levels affect how long Share locks (from a SELECT) are held:

RR - All accessed rows maintain the Share Lock until a Commit or Rollback happens

RS - All accessed rows maintain the Share Lock until the current SQL statement is completed.

CS - Share Locks are released when the DB2 is finished evaluating the row (when it moves onto the next row to evaluate).

UR - No locks are taken, and locks from other applications are ignored.

For maximum concurrency, especially in a non-data warehouse database, use the default of CS.

Isolation level does not affect how long Exclusive Locks are held that are a result of an INSERT, UPDATE, or DELETE. These locks are released when a commit or rollback occurs.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 11-11-06, 17:24
Peter.Vanroose Peter.Vanroose is offline
Registered User
 
Join Date: Sep 2004
Location: Belgium
Posts: 1,079
Quote:
Originally Posted by Marcus_A
RR - All accessed rows maintain the Share Lock until a Commit or Rollback happens.
It's even stronger than that: not only the rows that are accessed (i.e., that satisfy the WHERE condition) are locked, but also any rows that could potentially become "to be accessed" by somone else's update or insert. (These are so-called "phantom reads".) So the whole table needs to be locked to enforce repeatable read (RR).
__________________
--_Peter Vanroose,
__IBM Certified Database Administrator, DB2 9 for z/OS
__IBM Certified Application Developer
__ABIS Training and Consulting
__http://www.abis.be/
Reply With Quote
  #4 (permalink)  
Old 11-14-06, 11:52
sharrisdb2 sharrisdb2 is offline
Registered User
 
Join Date: Jul 2005
Location: Irvine, CA
Posts: 23
Just in case you wanted to know the names of these isolation levels, here they are:

RR - Repeatable Read
RS - Read Stability
CS - Cursor Stability
UR - Uncommitted Read

-- Steve
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On