SYMPTOM:
A SQL0913 error is received from a DB2 for Iseries database when trying to run reports that deal with large datasets. The full error is as follows.
Failed execution due to deadlock/timeout. SQL0913
This error is seen even if the SQL is run through DB Query Tool against the database pass by pass.
CAUSE:This error can be caused by the version of the ODBC calls used when submitting SQL queries to the DB2 database through an ODBC connection.
ACTION:The solution to this is to modify the database instance for the DB2 database and change the ODBC version under advanced settings to use 2.0 ODBC calls instead of 3.x calls. The older calls should avoid the database returning the deadlock error when trying to execute a large report.