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.

[{"Product":{"code":"SS3JSW","label":"IBM Sterling B2B Integrator"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"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":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
16 June 2018

UID

swg21975352