View previous topic :: View next topic |
Author |
Message |
Ranjish Beginner

Joined: 22 Dec 2002 Posts: 64 Topics: 28 Location: Chennai
|
Posted: Thu Oct 23, 2003 8:47 am Post subject: Will SPUFI lock the table ? |
|
|
Hi,
When we execute a SELECT query in a SPUFI and at the same time run a program which will try to delete the same rows, will the program abend ?
I had a case where the SELECT was executed and the output was displayed. But when an online transaction tried to delete the rows same time, it was hanging.
So when we are browsing the SPUFI output, is the table still under hold ?
Thanks
Ranjish |
|
Back to top |
|
 |
Bithead Advanced

Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Thu Oct 23, 2003 10:06 am Post subject: |
|
|
SPUFI selects can lock out online transactions if the results are left open. I know from experience. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
|
Posted: Thu Oct 23, 2003 10:48 am Post subject: |
|
|
Ranjish,
I guess you have defaulted your spufi isolation level to RR (RR=Repeatable Read). With repeatable read (RR) isolation, DB2 acquires the X(exclusive) locks on all pages or rows that fall within the range of the selection expression. All X locks are held until the application commits. Although this option can reduce concurrency, it can prevent some types of deadlocks and can better serialize access to data.
change that isolation level to CS and you will not hold the data.
Also when you are just selecting rows from spufi or QMF try coding WITH UR after the select statement , so that you are not holding up any resource.
Hope this helps...
Cheers
kolusu |
|
Back to top |
|
 |
Bithead Advanced

Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Thu Oct 23, 2003 10:57 am Post subject: |
|
|
We change it when it happens (it is hard for the user to change it since we have cut their fingers off....) |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
|
Posted: Thu Oct 23, 2003 11:11 am Post subject: |
|
|
Bithead,
Quote: |
We change it when it happens (it is hard for the user to change it since we have cut their fingers off....)
|
Do you meant to say that on Spufi panel , change defaults option is not changeable?
Code: |
Specify processing options:
5 CHANGE DEFAULTS ===> YES (Y/N - Display SPUFI defaults panel?)
|
or did you fix on the next panel?
Code: |
Enter the following to control your SPUFI session:
1 SQL TERMINATOR .. ===> ; (SQL Statement Terminator)
2 ISOLATION LEVEL ===> CS (RR=Repeatable Read, CS=Cursor Stability)
3 MAX SELECT LINES ===> 1000 (Maximum number of lines to be
returned from a SELECT)
Output data set characteristics:
4 RECORD LENGTH ... ===> 4092 (LRECL=Logical record length)
5 BLOCK SIZE ...... ===> 4096 (Size of one block)
6 RECORD FORMAT ... ===> VB (RECFM=F, FB, FBA, V, VB, or VBA)
7 DEVICE TYPE ..... ===> SYSDA (Must be DASD unit name)
Output format characteristics:
8 MAX NUMERIC FIELD ===> 33 (Maximum width for numeric fields)
9 MAX CHAR FIELD .. ===> 80 (Maximum width for character fields)
10 COLUMN HEADING .. ===> NAMES (NAMES, LABELS, ANY or BOTH)
|
I would be upset if they don't let me change any of the following
1.MAX SELECT LINES
2.RECORD LENGTH
3.BLOCK SIZE
4.RECORD FORMAT
What would be logical reasoning for not allowing users to change the defaults?. I can understand locking, but the other parameters???
Kolusu |
|
Back to top |
|
 |
Ranjish Beginner

Joined: 22 Dec 2002 Posts: 64 Topics: 28 Location: Chennai
|
Posted: Thu Oct 23, 2003 11:28 am Post subject: |
|
|
Kolusu,
Thank you very much for your reply.
Regards
Ranjish |
|
Back to top |
|
 |
Bithead Advanced

Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Thu Oct 23, 2003 11:36 am Post subject: |
|
|
Kolusu,
They can change it, they just don't know that they have to. |
|
Back to top |
|
 |
|
|