What do you do when your iSeries won't let your J2EE application access the DB2 database? There are a few things you can try.
In this case, say you are deploying a J2EE application on a WebSphere 5.2 Application Server. This application accesses a DB2 database on an iSeries server, which is not supporting transactions. You remove all transactions from the XML configuration files, but you are not able to configure the data source resource on WAS to avoid the error from the iSeries.
A couple Web development professionals offered their thoughts on the issue:
If the error is returning reason code 3, that means you are accessing a native iSeries file that is not journaled. Even if you try to remove transactions from your application, your SQL access will default to COMMIT(*CHG). Here are two possible solutions:
- Start journaling the files on the iSeries.
- Call a service program on the iSeries to do the database access.
The first suggestion I would make is to gather more information about the SQL7008 error. Find the error in the job log for the job. It will tell you the specific reason why the error occurred. There are 16 possible causes for this error.
The most common cause usually has to do with commitment control. By default iSeries SQL access runs with commitment control active. As mentioned, you can journal the file if it is not already journaled. If commitment control is not a concern, try the SQL SET statement to change the commit value. The statement would look something like SET OPTION COMMIT = *NONE.