MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Difference between SQL Codes -911 and -913

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
analyst
Beginner


Joined: 10 May 2007
Posts: 11
Topics: 8

PostPosted: Mon Aug 27, 2007 4:44 am    Post subject: Difference between SQL Codes -911 and -913 Reply with quote

Could anybody tell me what is the difference between SQL Code -911 & -913.This one was asked in an interview,but I could not get the correct answer after going thru some books.

-911: The current Unit of work has been rolled back due to Deadlock or timeout.
-913: Unsuccessful execution caused by deadlock or timeout.

Which case I will get -911 and which scenario I will get -913.And how to handle this in programs if we get this return code.Could anybody give me more insight into this.

Thanks in advance.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Aug 27, 2007 6:34 am    Post subject: Reply with quote

analyst,

Code:

    ___ TSO, Batch, and CAF ________________________________________________
   |                                                                        |
   |                                                                        |
   |                                                                        |
   | When a deadlock or timeout occurs in these environments, DB2 attempts  |
   | to roll back the SQL for one of the application processes. If the      |
   | ROLLBACK is successful, that application receives SQLCODE -911. If the |
   | ROLLBACK fails, and the application does not abend, the application    |
   | receives SQLCODE -913.                                                 |
   |                                                                        |
   |________________________________________________________________________|



Read this link for a detailed explanation of deadlock

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNAPJ12/4.2.2.3?

Hope this helps..

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group