gorddbds 060001JCXS Visits (1357)
DB2 LUW provides the db2pd tool with two fmp options that when used in conjunction with each other can provide information which will identify the routine that was running in a particular db2fmp. The following technote documents a method to determine which db2fmp a routine ran in using the db2pd tool.
If a db2fmp entry is logged in the db2diag.log, the entry should contain the process ID (PID) and thread ID (TID). Below is a sample of a db2diag.log entry which identifies the db2fmp PID and TID.
PID : 59900132 TID : 0 PROC : db2fmp
Since the db2pd -fmp command described in the above technote returns the PID and TID as well as the routine name and time of the run, it is possible to use the information in the db2diag.log to map a routine to its db2fmp. Below is a sample of the output.
59900132 0 2012
So we can see from the above output that the db2fmp error occurred while running the routine SYSPROC.ADMIN_CMD
gorddbds 060001JCXS Visits (1210)
DB2 LUW is capable of running Java applications as stored procedures or user defined functions (Stored Procedures and UDFs are collectively referred to as routines). When a Java routine is invoked DB2 will load the class and start a JVM in a process called the db2fmp. Unlike other DB2 processes, this process is owned by the fenced user, so it is necessary for the fenced user ID to have access to the libraries containing the application classes and the JVM. By default the JDK that is shipped with DB2 is used. You can use a JDK other than the one shipped with DB2 by modifying the JDK_PATH dbm cfg variable to point to the location of the desired JDK. If you are using a 1.6 JDK it will be necessary to set the environment variable DB2LIBPATH to the path containing the JDK. Not every JDK is supported for running routines. Supported JDKs are documented in the DB2 Infocenter. The JDKs supported for version 9.7 are listed at the following URL.
In order to execute a Java routine DB2 will start a JVM in the db2fmp. On AIX systems the db2fmp will be unable to start a JVM if the Stack Execution Disable mode is set to “all' or “setidfiles”. If the SED is set to one of these modes it will be necessary to change the mode in order to run Java routines. You can verify the setting of the SED by issuing the command sedmgr.
For information on General routine performance including additional information on Java routines see the following URL.
See the following URL for information on modifying the dbm cfg variable JDK_PATH