View previous topic :: View next topic
|
Author |
Message |
vadivem
New User
Joined: 08 May 2006 Posts: 24 Location: pune
|
|
|
|
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 |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
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 |
|
|
vadivem
New User
Joined: 08 May 2006 Posts: 24 Location: pune
|
|
|
|
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 |
|
|
vadivem
New User
Joined: 08 May 2006 Posts: 24 Location: pune
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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
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 |
|
|
vadivem
New User
Joined: 08 May 2006 Posts: 24 Location: pune
|
|
|
|
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 |
|
|
vadivem
New User
Joined: 08 May 2006 Posts: 24 Location: pune
|
|
|
|
can anyone give explaination on above question? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
vadivem
New User
Joined: 08 May 2006 Posts: 24 Location: pune
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
sreenivasreddyg
New User
Joined: 23 Apr 2005 Posts: 39 Location: delhi
|
|
|
|
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 |
|
|
|