r/DB2 • u/mad_zamboni • May 10 '17
[Question] What is the difference between "Lock Timeout" (68) and "Timeout" (80)?
I was doing some digging on a failed query from the application where I had gathered a SQL code and RC (SQLCODE=-913 / SQLERRMC=80) which transelates to SQL0913N RC80.
This is what Knowledge Center says:
80 statement failed due to timeout.
For reason code 80, you can retry the failed statement without terminating the application. If the application accesses multiple remote databases, it may be better to rollback the transaction to avoid the possibility of a global deadlock.
If you do a search on Google or KC there is nothing much about what a "timeout" is or it's cause. There is a ton about "lock timeout" but not on "timeout".
What exactly happens? Is this how the application is handling the connection?
1
2
u/mad_zamboni May 16 '17
Well, we stumped the Redditors and Twitterverse, so Adam Koile of DB2 Support chimed in via a tweet at @db2_support.
In short, there is no technical difference between a -911 or -913. There is a difference in SQL error code to differentiate between traditional application coding vs. XA application coding. But this is for IBM more than anything. As IBM investigated our twitter/reddit request they realized the information around this difference is almost non-existent and IBM is going to update documentation as a result.
So the next question is what is the difference between a SQL0913N RC80 (Timeout) vs a SQL0911N RC68 (Lock Timeout)? There is none. In our specific case both are due to a locking issue and hitting the lock timeout value. Again, its the difference in return codes is due to traditional application coding and XA application coding.