IBM Support

How do you enable a JDBC trace for a Java Stored Procedure or Java UDF?

Question & Answer


Question

How do you enable a JDBC trace for a Java Stored Procedure or Java UDF?

Answer

Issue the following command on the database server:

db2set DB2_JVM_STARTARGS="-Ddb2.jcc.override.traceLevel=-1 -Ddb2.jcc.override.traceFile=/tmp/jdbc_trace -Ddb2.jcc.override.traceFileAppend=true"

... where /tmp/jdbc_trace can be any path/file name that has write privilege by the DB2 fenced user id.

If the database manager configuration parameter KEEPFENCED is set to YES, then this command will require the DB2 instance to be recycled:


db2stop
db2start

To remove this parameter issue the command:

db2set DB2_JVM_STARTARGS=

... and then restart the DB2 instance again (assuming KEEPFENCED=YES is used).

Related Information

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Programming Interface - JCC - Type 4","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.7;10.1;10.5","Edition":"Advanced Enterprise Server;Advanced Workgroup Server;Enterprise Server;Express;Express-C;Personal;Workgroup Server","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21884054