Support Article

Unable to connect to external DB2 11.1 Function Mode

SA-37304

Summary



System connects to an external DB2 z/OS database as well as the DB2 LUW PegaRULES database using an XA driver.

Upgraded DB2 z/OS database from 10.1 to 11.1 but running in compatibility mode and did not see any issues.

After switching DB2 z/OS from compatibility mode to function(conversion) mode in version 11.1 unable to connection to any of the tables in the DB2 z/OS database.


Error Messages



Caused by:
com.ibm.db2.jcc.am.SqlException: [jcc][10341][11670][4.21.29] An SQL OPEN for a held cursor was issued on a XA connection ERRORCODE=-4496, SQLSTATE=null
at com.ibm.db2.jcc.am.kd.a(kd.java:794)
at com.ibm.db2.jcc.am.kd.a(kd.java:66)
at com.ibm.db2.jcc.am.kd.a(kd.java:133)
at com.ibm.db2.jcc.am.sp.xb(sp.java:3479)
at com.ibm.db2.jcc.am.tp.a(tp.java:4695)
at com.ibm.db2.jcc.am.tp.b(tp.java:4173)
at com.ibm.db2.jcc.am.CallableStatement.lc(CallableStatement.java:175)
at com.ibm.db2.jcc.am.DatabaseMetaData.executeCatalogQuery(DatabaseMetaData.java:7861)
at com.ibm.db2.jcc.am.DatabaseMetaData.getPrimaryKeysX(DatabaseMetaData.java:7212)
at com.ibm.db2.jcc.am.DatabaseMetaData.getPrimaryKeys(DatabaseMetaData.java:7139)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDatabaseMetaData.getPrimaryKeys(WSJdbcDatabaseMetaData.java:1415)
at com.pega.pegarules.data.internal.store.DatabaseDatabaseMetaData.getPrimaryKeys(DatabaseDatabaseMetaData.java:575)
at com.pega.pegarules.data.internal.access.TableInformationMapImpl.lookupTableInfo(TableInformationMapImpl.java:463)
... 76 more


Steps to Reproduce



Upgrade DB2 (z/OS) from 10.1 to 11.1 and activate the conversion mode.


Root Cause



A defect or configuration issue in the operating environment.

The application is using the JDBC API to access the database metadata.

There should not be any change needed to the application after the database upgrade.

By running db2zos host variable trace on the database showed that the driver querying against DB2 catalog did not return any row and was passing junk characters.

Found that the DB2 zos upgrade was not completed correctly which caused metadata stored procedures to be bound with wrong encoding - ebcdic instead of unicode.

Resolution



Make the following change to the operating environment: Correct the database to use the correct encoding.

Published May 1, 2017 - Updated May 15, 2017

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.