IBM Support


DB2 Alias name behaviour changes with latest drivers versions

Troubleshooting


Problem

If IBM Sterling B2B Integrator (SBI) installed with DB2 as database and with the latest DB2 JDBC Driver, then using SQL manager any SQL query that uses alias names for column names does not return the ALIAS name instead returns the actual column name.

Cause


It is because the DB2 Driver for JDBC and SQL version 4.0 and later, the default behaviour of the ResultSetMetaData.getColumnName and ResultSetMetaData.getColumnLabel differs from the default behaviour for earlier JDBC drivers. The user can use the useJDBC4ColumnNameAndLabelSemantics property to change this behaviour in the jdbc.url.

Resolving The Problem

Follow the steps below to resolve the issue:

- Navigate to <SBI_INSTALL_DIR>/properties directory and edit jdbc.properties.in

- Edit the file and change the db2Pool.url to:


jdbc:db2://host:port/DBname:useJDBC4ColumnNameAndLabelSemantics=false;


- Save changes and then stop SBI

- Run the setupfiles.sh

- Start SBI

The user can also override this in customer_overrides.properties as a best practice.

Note: Alternately, the user could revert back to DB2 jdbc driver version < 4.0 to resolve the issue.

Internal Use Only

This technote was generated by Technote Kickstart 1.1.0.97 based on Industry Solutions PMR 03009,999,818.
View the associated PMR's text via Wellspring at: http://eclient.lenexa.ibm.com:9082/DocFetcher/source/PMR/03009.999.818%20O15/12/04

[{"Product":{"code":"SS3JSW","label":"Sterling B2B Integrator"},"Business Unit":{"code":"BU012","label":"WCE"},"Component":"Maintenance","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF012","label":"IBM i"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"All","Edition":""}]

Document Information

Modified date:
16 June 2018

UID

swg21975352