Configuring JVMs in IBM Db2 stored procedure

Follow these steps to configure JVMs in an IBM® Db2® stored procedure.

Before you begin

Add a JVMPROPS file if this file does not exist or modify a JVMPROPS file. For information about the description of the JVMPROPS file, see Runtime environment for Java routines.

About this task

For Java routines, the startup procedure for the Db2 stored procedure address space contains a JAVAENV DD statement. This statement specifies a dataset that contains Language Environment runtime options for the routines that run in the stored procedure address space. The following example shows how to locate the JAVAENV DD in a Db2 stored procedure address space called DB2SPJVM:

//JAVAENV DD DISP=SHR,
//   DSN=DB2.COMMON.JAVAENV.V110.DRVJCC

For information about adding the enablement options, see Configuring Java Applications for Monitoring.

Procedure

Complete the following steps to configure JVMs in an IBM Db2 stored procedure:
  1. Locate the JVMPROPS keyword in the JAVAENV data set.
    The following example shows how to locate the JVMPROPS keyword in the JAVAENV data set:
    
    ENVAR("_CEE_ENVFILE=/usr/lpp/db2b10/base/classes/dsnenvfile.txt",
    "JVMPROPS=/usr/lpp/java/properties/dsnjvmsp")
    Note: In the absence of the JVMPROPS parameter, use the value of the _CEE_ENVFILE parameter, which is shown in the first line in the preceding code block.
  2. Add the enablement options for the IBM Z OMEGAMON AI JVMTI agent and the OMEGAMON AI for JVM Agent.
  3. Restart the Db2 stored procedure to pick up the changes.