To debug a stored procedure, the Java™ Development Kit (JDK) path needs to
be set up on the Linux®, Unix, and Windows® (LUW) server and debug server
tracing can be turned on so you can monitor the status of the debug server.
To set up the LUW server for debugging, complete the following
steps:
- Set the JDK installation path on the LUW server by issuing the
command db2 update dbm cfg using JDK_PATH <JDK installation path>.
For example, if your JDK installation path is /wsdb/v91/bldsupp/AIX5L64/jdk1.4.2_sr1,
you would issue the command db2 update dbm cfg using JDK_PATH /wsdb/v91/bldsupp/AIX5L64/jdk1.4.2_sr1.
Note: On Windows, if your JDK installation path contains spaces,
put single quotes around it. For example, if you installed the JDK to its
default installation directory, issue the command db2 update dbm cfg
using JDK_PATH 'C:\Program Files\IBM\SQLLIB\java\jdk'.
- To be able to check the status of the debug server, turn on tracing
for it by completing the following steps:
- Create a log file on the server. If you are running the workbench
on Unix, create /tmp/db2psmd.log and ensure that the
file has write access. If you are running the workbench on Windows,
create c:\tmp\db2psmd.log.
- In the workbench preferences, set the Diagnostic
error trace level on DB2 server setting to 2. For information
about setting stored procedure preferences, see the related topic.