Deadlock and Time out



IBM's flagship relational database management system

Deadlock and Time out

Postby fornanthakumar » Fri Dec 28, 2012 11:35 am

Hi,

How can we differentiate 911 happened because of deadlock or timeout ?

Sometimes there is question which i frequently asked is "what ever happens the timeout error will be the result ? if the application is waiting for the resource longtime or App A is waiting for App B's resource and vice versa (Deadlock)" Then why the term deadlock silently influencing.. kind of unconcluded the discussion haunting around in my mind.

If time out happens then the resouce will be rolled back until the last commit point , this is -911 happened due to timeout.

in deadlock , any one application will be rolled back thought both application waiting for the resource and -911 happened. In this case why do not DB2 rolled back both applications ?

Regards,
Nanthu.Y
Regards,
Nanthu.Y.
fornanthakumar
 
Posts: 69
Joined: Fri Oct 22, 2010 1:58 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Deadlock and Time out

Postby enrico-sorichetti » Fri Dec 28, 2012 1:55 pm

in a deadlock when ALL - 1 competitors are <terminated> the survivor will not be in a deadlock any longer
and will happily terminate <normally>
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Deadlock and Time out

Postby GuyC » Fri Dec 28, 2012 2:27 pm

SQLERRD(3) also contains the reason-code which indicates whether a deadlock or timeout occurred. The most common reason codes are:
•00C90088 - deadlock
•00C9008E - timeout

In the log you should also find 1 of the following
DSNT376I

PLAN=plan-name1 WITH CORRELATION-ID=correlation-id1
CONNECTION-ID=connection-id1 LUW-ID=luw-id1 THREAD-INFO=thread-information1
IS TIMED OUT. ONE HOLDER OF THE RESOURCE IS PLAN=plan-name2 WITH
CORRELATION-ID=correlation-id2 CONNECTION-ID=connection-id2 LUW-ID=luw-id2
THREAD-INFO= thread-information2 ON MEMBER member-name

DSNT375I

PLAN=plan-name1 WITH CORRELATION-ID=correlation-id1
CONNECTION-ID=connection-id1 LUW-ID=luw-id1 THREAD-INFO=thread-information1
IS DEADLOCKED WITH PLAN=plan-name2 WITH CORRELATION-ID=correlation-id2
CONNECTION-ID=connection-id2 LUW-ID=luw-id2 THREAD-INFO= thread-information2
ON MEMBER member-name
I can explain it to you, but i can not understand it for you.
GuyC
 
Posts: 315
Joined: Tue Aug 11, 2009 3:23 pm
Has thanked: 1 time
Been thanked: 4 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post