IBM Support

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

Technote (FAQ)


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

JDBC Driver Tracing

Document information

More support for: DB2 for Linux, UNIX and Windows
Programming Interface - JCC - Type 4

Software version: 9.7, 10.1, 10.5

Operating system(s): AIX, HP-UX, Linux, Solaris, Windows

Software edition: Advanced Enterprise Server, Advanced Workgroup Server, Enterprise Server, Express, Express-C, Personal, Workgroup Server

Reference #: 1884054

Modified date: 29 April 2015