IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Want in depth description on CS and RR (DB2)


IBM Mainframe Forums -> Testing & Performance
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sasidhar001
Warnings : 1

New User


Joined: 14 May 2006
Posts: 3
Location: Bangalore

PostPosted: Thu Nov 09, 2006 10:48 am
Reply with quote

Hi Can anybody post in depth explanation of RR and CS in practical situation. It would be helpful because this is the must question for every interview.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Thu Nov 09, 2006 11:33 am
Reply with quote

Hi there,

RR: Repeatable read holds all locks untile the transaction completes or a syncpoint is issued.
CS: Cursor stablity means that DB2 takes a lock on the page the cursor is accessing and releases the lock when the cursor moves to another page.
Back to top
View user's profile Send private message
chettiyar
Currently Banned

New User


Joined: 27 Sep 2006
Posts: 6
Location: india,kerala

PostPosted: Tue Nov 21, 2006 2:42 pm
Reply with quote

Isolation level refers to the extent by which the data
accessed by a transaction is isolated from all other
transactions.

DB2 supports 2 Isolation Levels for every transaction

Cursor Stability (CS).

Repeatable Read (RR) (Default).

Cursor Stability (CS)
DB2 takes a lock on the page the cursor is accessing and releases the lock on that page when the cursor moves onto a different page. This is not done when we use FOR UPDATE OF statement in cursor.

The lock on the last page is released at commit time or at thread deallocation time.
Repeatable Read (RR)
In CS, while your transaction reads data, other transaction could change the data you have already read.

In RR, DB2 holds all the page locks while the cursor is moving on till the transaction commits or the thread is deallocated.

CS provides higher concurrency.

RR provides higher consistency.

Read Stability (RS)
Is similar to RR, but without allowing qualifying data to be updated or deleted by another process. It offers greater concurrency than repeatable read, because although other applications cannot change rows that are returned to the original application, they can insert
new rows, or update rows that did not satisfy the original application's search condition.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Testing & Performance

 


Similar Topics
Topic Forum Replies
No new posts Parameter description for Beta92 prog... Compuware & Other Tools 1
No new posts TWS EQQYCAIN - not sure how to get ap... IBM Tools 0
No new posts Error message description while putti... JCL & VSAM 8
No new posts DSNTIAR - ERROR message description TSO/ISPF 5
No new posts adding a description DFSORT/ICETOOL 1
Search our Forums:

Back to Top