Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

DB2 isolation Levels - CS and RR

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
anup_marathe

New User


Joined: 17 Jan 2006
Posts: 2
Location: India

PostPosted: Tue Jan 17, 2006 2:53 pm    Post subject: DB2 isolation Levels - CS and RR
Reply with quote

Can somebody specify the exact difference between Isolation levels CS and RR.
consider a scenario where I am updating table through a cursor with Isolation level CS. I have updated the 5th row in cursor and now I am on 6th row. commit is not issued yet.
then, at this time, can any other application read or update the 5th row?
Back to top
View user's profile Send private message

nrsmca

New User


Joined: 25 May 2005
Posts: 14

PostPosted: Tue Jan 17, 2006 4:18 pm    Post subject:
Reply with quote

Hi,

The another program can Update or read the 5 th row...because the lock is released from 5th row...!

Bye,
nrsmca
Back to top
View user's profile Send private message
senthilssg

New User


Joined: 09 Dec 2005
Posts: 64
Location: USA

PostPosted: Tue Jan 17, 2006 5:04 pm    Post subject:
Reply with quote

Hi anup_marathe,

i agree with nrsmca 's point .

please refer this , i think , you will get idea about cursor stability isolation .

When the Cursor Stability isolation level is used, each row that is referenced by a cursor being used by the isolating transaction is locked as long as the cursor is positioned on that row. The lock acquired remains in effect either until the cursor is repositioned (usually by calling the FETCH statement) or until the isolating transaction terminates. Thus, when this isolation level is used, SELECT statements that are issued more than once within the same transaction may not always yield the same results. Lost updates and dirty reads cannot occur; non repeatable reads and phantoms, however, can and may be seen.

When a transaction using the Cursor Stability isolation level retrieves a row from a table via an updatable cursor, no other transaction can update or delete that row while the cursor is positioned on it. However, other transactions can add new rows to the table and perform update and/or delete operations on rows positioned on either side of the locked row, provided that the locked row itself was not accessed using an index. Furthermore, if the isolating transaction modifies any row it retrieves, no other transaction can update or delete that row until the isolating transaction is terminated, even after the cursor is no longer positioned on the modified row.




Regards ,
Senthil

'CORRECT ME IF I'M WRONG'
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Easytrieve provides how many levels o... enrico-sorichetti Mainframe Interview Questions 11 Wed Feb 29, 2012 12:49 pm
No new posts Current Isolation level Pandora-Box DB2 2 Fri Jan 13, 2012 6:59 pm
No new posts Problem related to isolation level. G1NXU6T DB2 1 Fri Feb 25, 2011 6:50 pm
No new posts Lock termination with RR isolation Level Manojtyagi1979 DB2 1 Mon Dec 13, 2010 8:56 pm
No new posts Mutiple 01 levels in copybook cvishu COBOL Programming 3 Mon Oct 11, 2010 2:44 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us