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

Regardin Isolation Levels


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vadivem

New User


Joined: 08 May 2006
Posts: 24
Location: pune

PostPosted: Wed Nov 21, 2007 10:39 pm
Reply with quote

I having two programs A,B it runs simultaneously but while running the program the Isolation status has been CS(Cursor Stability) here both the programs access same row now which will be access first?
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Thu Nov 22, 2007 10:12 am
Reply with quote

Vadie,

Quote:
I having two programs A,B it runs simultaneously but while running the program the Isolation status has been CS(Cursor Stability) here both the programs access same row now which will be access first?

Cannot predict.
Back to top
View user's profile Send private message
vadivem

New User


Joined: 08 May 2006
Posts: 24
Location: pune

PostPosted: Thu Nov 22, 2007 11:10 pm
Reply with quote

Murali,

How do you find if two programs access same row but the Isolation level has been (CS)?

Wheather is there any transaction lock contains the information ?
Back to top
View user's profile Send private message
vadivem

New User


Joined: 08 May 2006
Posts: 24
Location: pune

PostPosted: Mon Nov 26, 2007 11:42 pm
Reply with quote

I having two programs A,B it runs simultaneously but while running the program the Isolation status has been CS(Cursor Stability) here both the programs access same row now which will be access first?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Nov 27, 2007 12:13 am
Reply with quote

Hello,

Is there some additional question? Re-posting the original words usually will not accomplish much. . .

As the question is posted, the program that reads the row first will get it. I don't know if that is what you mean by predict or not icon_confused.gif

If you provide more info about what you are trying to do or are concerned about, we may be able to provide more suggestions.
Back to top
View user's profile Send private message
vadivem

New User


Joined: 08 May 2006
Posts: 24
Location: pune

PostPosted: Tue Nov 27, 2007 12:34 am
Reply with quote

I'm sorry,
How do you find if two programs access same row but the Isolation level has been (CS)?

Wheather is there any transaction lock contains the information?
Back to top
View user's profile Send private message
vadivem

New User


Joined: 08 May 2006
Posts: 24
Location: pune

PostPosted: Mon Dec 03, 2007 10:37 pm
Reply with quote

can anyone give explaination on above question?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Dec 03, 2007 10:50 pm
Reply with quote

Isolation level is one thing, the locks (explicit and implicit) are another.

if both programs ran without one receive a negative sqlcode indicating that some kind of contention was occuring then you don't have a problem.

you are not stating a problem for which we can provide you a solution. You are posing an hypothetical half-problem; all you are going to get are half-ass answers and that is what you deserve.

If there is any contention, db2 will let you know in the form of a neg sql code for the program that is second in line, if the first program does not release any locks before the waiting period (db2 parms) is over for the second.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Dec 03, 2007 10:55 pm
Reply with quote

Hello,

My guess would be that there have been no "answers" because the question is not completely understood. Please keep in mind that while your question is completely clear to you, it may not be clear to others.

If an answer is posted, how will you use the info?

If you need to control access to a row, it might be better to read for update.

If we understand your requirement, we may be able to offer suggestions.
Back to top
View user's profile Send private message
vadivem

New User


Joined: 08 May 2006
Posts: 24
Location: pune

PostPosted: Mon Dec 03, 2007 11:08 pm
Reply with quote

The two sucessful programs runs simultanously while running the isolation level has been (CS) here both the programs access same row.

suppose the first program access that particullar row how do we find is it first program?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Dec 03, 2007 11:25 pm
Reply with quote

Hello,

To receive help from the forum, you need to answer questions asked of you.
Quote:
If an answer is posted, how will you use the info?


Quote:
suppose the first program access that particullar row how do we find is it first program?
You probably doni't (at least not as things are coded now). If the program reads the row, it "has" read it. What concern is there about another read in some other program?
Back to top
View user's profile Send private message
sreenivasreddyg

New User


Joined: 23 Apr 2005
Posts: 39
Location: delhi

PostPosted: Tue Dec 04, 2007 2:44 am
Reply with quote

DB2 can execute the things at high speed. I do not understand why you trying to know which one will access first
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Easytrieve provides how many levels o... Mainframe Interview Questions 11
No new posts Current Isolation level DB2 2
No new posts Problem related to isolation level. DB2 1
No new posts Regardin stored procedures DB2 4
No new posts Lock termination with RR isolation Level DB2 1
Search our Forums:

Back to Top