How do you enable a JDBC trace for a Java Stored Procedure or Java UDF?
Posted: April 30, 2015 Filed under: DB2 LUW | Tags: DB2 LUW Leave a commentHow do you enable a JDBC trace for a Java Stored Procedure or Java UDF?
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).