× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Also interesting...

The infocenter doesn't list an SQL code of -911 as a possible message
from the i.

Ah ha...

SQL State Description
SQL Code
57033 Deadlock or timeout occurred without automatic rollback. -913


DB2 LUW has the above plus..
40001 Deadlock or timeout with automatic rollback occurred. -911

DB2 for i doesn't have _any_ Class 40 SQL states...

HTH,
Charles



On Wed, Jan 12, 2011 at 2:39 PM, Charles Wilt <charles.wilt@xxxxxxxxx> wrote:
Interestingly...

With both tables set WAITRCD=*NOMAX, one of my sessions gets the SQL
913 error...the other continues to wait..

So the system does seem to detect the deadlock, but doesn't throw the
expected error...nor does it automatically rollback a transaction.

Charles.

On Wed, Jan 12, 2011 at 2:14 PM, Charles Wilt <charles.wilt@xxxxxxxxx> wrote:
Your scenario doesn't fit the definition of a deadlock I don't
think...doesn't a deadlock require more than one resource?

Though I tried it with two tables, and still only get the SQL 913 error...

Perhaps you have to have WAITRCD = *NOMAX, for the system to kick out
the deadlock error?

Charles



On Tue, Jan 11, 2011 at 7:32 PM, Jonathon Creenaune
<jonathon@xxxxxxxxxxxxxx> wrote:
Does DB2 for iseries support deadlock detection? I can't get it to work. I'm
manually running the following sql commands in different transactions:


T1: set transaction isolation level RS;
T1: select * from aschema.atable where id = 1;

T2: set transaction isolation level RS;
T2: select * from aschema.atable where id = 1;

T1: update aschema.atable set acolumn = acolumn where id = 1; -- this
blocks, which is correct
T2: update aschema.atable set acolumn = acolumn where id = 1; -- this
blocks, which is correct


On DB2 LUW, after 10 seconds I get sql 911 reason 2, indicating that a
deadlock has been detected and one of the transactions has been rolled back.
The other one then proceeds.

On DB2 for iseries, after 30 seconds (the table's record lock wait time) I
get sql 913, indicating that the record lock wait time has been reached. No
deadlock is detected. I'm wondering if there's something I need to configure
to enable deadlock detection.

I'm running the tests on a v6r1 machine through jt400 6.1.

Any help is much appreciated,

Jonathon
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.