IBM Support

JDBC trace for IBM App Connect Enterprise and IBM Integration Bus

Troubleshooting


Problem

IBM App Connect Enterprise (ACE) and IBM Integration Bus (IIB) allows for interactions with databases via ODBC and JDBC.
Use this procedure to capture a trace of a JDBC driver for the purpose of providing to IBM Support for analysis.

Resolving The Problem

  1. Create a properties file to contain the trace settings.
    Name this file 'jcprops.txt' and note the path location.
    Place these line items in this file:
    db2.jcc.traceDirectory=<path>
    db2.jcc.traceFile=jdbctrace.txt
    db2.jcc.traceFileAppend=true
    db2.jcc.traceLevel=-1

    Note: On Windows, the file path separator, backslash ("\"), needs to be escaped.
    The file path should look similar to:

    db2.jcc.traceDirectory=C:\\temp\\jdbctrace.txt


  2. Enable tracing by setting an environment variable to point to this properties file:
    IBM_JAVA_OPTIONS=-Ddb2.jcc.propertiesFile=<path>/jcprops.txt

  3. Stop and restart the broker/node to pick up the environment variable.

  4. Collect a service level trace of the Int.Server while recreating the JDBC issue:
     - Collecting "Service Level" Trace for an ACE Integration Server
     - Collecting "Service Level" Trace for an IIB Integration Server

  5. Disable JDBC tracing by unsetting the environment variable and restarting the broker/node.
  1. Download the Oracle JDBC debug driver.
    This is provided by Oracle, and can be found on their website:
    https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html
    Note: The debug driver should be named ojdbcX_g.jar, where X is the version being used (eg. ojdbc6_g.jar).

  2. Place the debug driver jar file into the jarsUrl directory, defined in the IIB JDBCProvider configurable service.
    mqsireportproperties <brokerName> -c JDBCProviders -o <JDBCProviderName> -r

  3. Disable the standard JDBC driver.
    Rename the standard jar file 'ojdbc6.jar' to 'ojdbc6.jar_orig'.
    It is necessary to rename the extension of this file to prevent WMB/IIB from loading the wrong JAR file.
    Note: WMB/IIB will need to be stopped if this this jar file is currently in use.

  4. Enable JDBC tracing by setting a jvmSystemProperty on the Execution Group:
    mqsichangeproperties <brokerName> -e <egName> -o ComIbmJVMManager -n jvmSystemProperty -v"-Doracle.jdbc.Trace=true"

  5. Stop and restart the broker/node to pick up the new JVM setting.

  6. Collect a service level trace of the Int.Server while recreating the JDBC issue:
     - Collecting "Service Level" Trace for an ACE Integration Server
     - Collecting "Service Level" Trace for an IIB Integration Server
    Note: You can check that the formatted trace contains JDBC trace entries by searching for the string "JavaRootLogger: oracle.jdbc".

  7. Disable JDBC tracing by unsetting the jvmSystemProperty:
    mqsichangeproperties <brokerName> -e <EGName> -o ComIbmJVMManager -n jvmSystemProperty -v ''

  8. Disable JDBC tracing by stopping the broker/node and:
    • Rename/remove the debug jdbc jar
    • Revert the original jar file name in the jarsUrl directory

 

Notes:

Please ensure:
  • the path of the trace file is not the IIB installation or working directory.
  • the trace file entry points to a file system that has enough disk space.
  • the user running the trace has write permissions to the directory where trace file is written.

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSDR5J","label":"IBM App Connect Enterprise"},"ARM Category":[{"code":"a8m0z000000cvj9AAA","label":"ACEv11->Database"}],"ARM Case Number":"","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"All Version(s)","Line of Business":{"code":"LOB36","label":"IBM Automation"}},{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSNQK6","label":"IBM Integration Bus"},"ARM Category":[{"code":"a8m50000000CiQBAA0","label":"IIB2->Databases"}],"Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"All Version(s)","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
26 June 2020

UID

swg21965857