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

Difference bw -911 & -913 SQLCODES?


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

New User


Joined: 31 May 2007
Posts: 19
Location: Chennai

PostPosted: Fri Apr 24, 2009 11:04 am
Reply with quote

Hi,

What is the difference between -911 & -913 SQLCODES?

Thanks,
raam
Back to top
View user's profile Send private message
anandinmainframe

Active User


Joined: 31 May 2007
Posts: 171
Location: India

PostPosted: Fri Apr 24, 2009 11:40 am
Reply with quote

Raam,

-911 THE CURRENT UNIT OF WORK HAS BEEN ROLLED BACK DUE TO DEADLOCK OR TIMEOUT. REASON reason-code, TYPE OF RESOURCE resource-type, AND RESOURCE NAME

-913 UNSUCCESSFUL EXECUTION CAUSED BY DEADLOCK OR TIMEOUT. REASON CODE reason-code, TYPE OF RESOURCE resource-type, AND RESOURCE NAME resource-name
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Apr 24, 2009 11:55 am
Reply with quote

Don't you have access to documentations?
Back to top
View user's profile Send private message
raam2smart

New User


Joined: 31 May 2007
Posts: 19
Location: Chennai

PostPosted: Fri Apr 24, 2009 12:19 pm
Reply with quote

I have access. But to me both look like one and the same. Thats why i posted this topic.
Back to top
View user's profile Send private message
raam2smart

New User


Joined: 31 May 2007
Posts: 19
Location: Chennai

PostPosted: Fri Apr 24, 2009 12:27 pm
Reply with quote

Still i dont see any difference. Can any one explain?
Back to top
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Fri Apr 24, 2009 2:06 pm
Reply with quote

-911 - deadlock encountered and rollback happens to previously committed point while in -913 this rollback does not happen ....

ibmmainframes.com/references/a2.html#-911
Back to top
View user's profile Send private message
raam2smart

New User


Joined: 31 May 2007
Posts: 19
Location: Chennai

PostPosted: Fri Apr 24, 2009 2:11 pm
Reply with quote

Thanks Ashimer!!! icon_smile.gif
Back to top
View user's profile Send private message
Raghu navaikulam

Active User


Joined: 27 Sep 2008
Posts: 193
Location: chennai

PostPosted: Sat Apr 25, 2009 1:19 am
Reply with quote

Hi raam2smart

In -911 a request is waiting for lock due to lack of locks in the system.
DB2 will allow the request to wait in the queue for a specific period of time(System specific). If within the specified time DB2 is unable to supply sufficient locks, then the request will be removed from the queue and sqlcode of -911 will be send to the requestor. This is known as "Timeout".

But in -913, two requests are waiting for another resource while holding one resource. Without getting the mutually held resource, both request can not proceed. This situation is called "Dead Lock". In both cases DB2 will supply Sqlcode -911/-913 with reason code and resource name. If you analyse reason code, you can see whether it is a "Timeout" or " Dead Lock".

If Reason code is 00C90088, then it is a "Dead Lock" and if reason code is 00C9008E, then it is a "Dead Lock"
In this case DB2 has to terminate any one of the request. Those request made more modification in the database within the current UOW will allow to continue and the other will be terminated. The terminated request will get sqlcode of -913 and will be Rolled back to a prior point in consistency.

Hope you may be able to get some idea about timeout and deadlock.

Regards
Raghu
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 Timestamp difference and its average ... DB2 11
No new posts Difference when accessing dataset in ... JCL & VSAM 7
No new posts What is the difference between Taskty... Compuware & Other Tools 2
No new posts Difference between VALIDPROC and CHEC... DB2 3
No new posts Difference between CEE3250C and CEE3204S COBOL Programming 2
Search our Forums:

Back to Top