IBM Support

How to set properties in the IBM DB2 JDBC driver?

Question & Answer


Question

In IBM Sterling Selling and Fulfillment Suite running on DB2, how can certain JDBC driver properties be set?

Cause

In some scenarios JDBC properties like traceLevel, traceFile, or any other property need to be set to troubleshoot a problem, or to enable a certain DB2-related functionality. Normally, JDBC properties are set in INSTALL_DIR/properties/jdbc.properties and can be changed in customer_overrides.properties.
But this does not apply to all the properties that are available in the IBM Data Server Driver for JDBC. A list of all properties can be found in the DB2 Information Centers, for example here.

Answer

Setting JDBC properties in Sterling's connection URL

This has to be done if Sterling's built-in connection pooling is used (-Dvendor=shell). It is used in all agent and integration servers, and can also be used in the application server. In Sterling's customer_overrides.properties file, edit your JDBC connection URL and append the property:

jdbcService.db2Pool.url=jdbc:db2://host:port/dbname:property=value;

Example:

jdbcService.db2Pool.url=jdbc:db2://DB2SERVER:50000/SSFSDB:traceLevel=4;traceFile=myFile.log;

Please watch the punctuation here. After the database name, there is a colon (:), and after every property will be a semi colon (;).


Setting JDBC properties in WebSphere Application Server

If the Sterling application (not agent or integration server) uses WebSphere's connection pooling (-Dvendor=websphere), then you have to set the property in the corresponding WAS screen:

Integrated Solutions Console > Resources > JDBC > Data Sources > your_datasource > Custom properties > New

Name: <property>
Value: <value>
Type: <datatype of property>

Example:

Name: traceLevel
Value: 4
Type: java.lang.Integer

[{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Documentation","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
10 May 2022

UID

swg21688139