Configuring JVMs in an IBM Db2 stored procedure

To monitor a JVM that runs in an IBM Db2® stored procedure, locate the JVMPROPS keyword in the JAVAENV dataset. Then, add the enablement options for the Health Center Agent and the OMEGAMON® for JVM Agent, and restart the Db2 stored procedure to pick up the changes.

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 IBM Db2 for z/OS: 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 JVMs in subsystems.

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 Health Center Agent and the OMEGAMON for JVM Agent.
  3. Restart the Db2 stored procedure to pick up the changes.