We have an application connecting to DB2 under z/OS and, after a while, there seems to be some resource limit being hit on the mainframe side. Since we're using BIRT, it seems the only control we have over the JDBC code is with stanzas in the URL itself. we don't have direct Java control over the connection or statements (except for the SQL itself of course) although it may be possible by using Javascript within the report design. So we can turn on debugging with something like:
jdbc:db2://machine.com:1234/INSTANCE:traceFile=c:/db2.txt;traceLevel=-1;
Eventually the application using JDBC will simply stop and no more data will be written to the log file. Doing a TSO NETSTAT
on the mainframe shows about 50 sessions in ESTABLISHED
state.
Now we know this is a problem on the mainframe side since, when it happens, no JDBC connection to that instance will work (from any client). At that point, we have to restart the database to continue.
I've googled quite a lot of stuff, some of which seems to indicate that you may need to commit queries before you close a session. It may be that the sessions may be being held open because there's something wrong in the BIRT close code (at least in terms of what DB2 expects).
Has anyone experienced anything like this before? How did you fix it (if at all)? Is there a way to solve it by using just the JDBC URL stanzas or Javascript code within the report design?
FWIW, we're using DB2 9.1 and BIRT 2.2.1.