You can find out the FMP serving Java routines (i.e. it has loaded the JVM into its address space) using db2pd -fmp ( the flags should have 0x3 at the end .. 0x1 its a java fmp and 0x2 for it being threaded (i.e. each thread serving a separate call to Java SPs.) .. db2pd -fmpexechistory (short form is -fmpe) is to find out what each process ran which can also help figure out which process is serving the Java routines.
Original Message:
Sent: Tue March 10, 2026 12:21 PM
From: Damir Wilder
Subject: Db2 and the Java libraries...
Hi Rajib,
Thanks for your answers, they do make a lot of sense.
And they also confirm what Jan mentioned above (JDBC calls being translated into DRDA protocol).
Regarding the FMPs, we should be able to figure out if they ever (since the last instance restart?) used Java (JVM) by running the command that Mark mentioned (also above):
db2pd -fmpe
Is that right (the command is supposed to give some history on the db2fmp usage, but the documentation is pretty vague on what exactly that is)?
Regards, Damir
------------------------------
Damir Wilder
Senior Consultant
Triton Consulting
London
Original Message:
Sent: Tue March 10, 2026 11:40 AM
From: Rajib Sarkar
Subject: Db2 and the Java libraries...
To answer your questions:
1. When a remote JDBC connection comes to Db2, it is using DRDA protocol so no need for any Java .. it's the driver (db2jcc.jar) which is helping convert client requests and sending using DRDA to the server.
2. For Java External routines, Db2 has a process called "db2fmp" which essentially loads up a JVM (which is why no Java external routine can run in unfenced mode) in its own process address space and then creates threads for connections which are calling Java routines/stored procedures. In the load up phase it does load up the standard libraries included in Java (for I/O, network etc.) from the path CLASSPATH directory so that it can support the calls made in the Java External SP. In Db2 v11.5 Db2 LUW uses Oracle Java whereas in Db2 v12.1 it's OpenJDK.
In no case, it needs to load any JAR file for any work .. Db2 just facilitates running of Java routines and just loads them up in the JVM to support the routine calls. For its native work, it's all C libraries (.so or .a).
Hope this helps.
Rajib
AWS RDS Db2
------------------------------
Rajib Sarkar
Original Message:
Sent: Wed March 04, 2026 11:49 AM
From: Damir Wilder
Subject: Db2 and the Java libraries...
Hi All,
To my understanding, Db2, being a native C++ application (right?), will only use the Java libraries (or the JRE) in such cases as:
-when a Java client requests a remote connection to a Db2 database (via JDBC)
-when external Java stored procedures are being called from within a Db2 database
Have I got this right, or completely at the wrong end of the stick?
Also, does anyone have any ideas how I would check if my Db2 instance/database ever uses any of those Java/JAR files?
What might work here is to set the DIAGLEVEL to 4 (at least temporarily) and then scan the db2diag.log file for any occurrences of the words such as "Java" and "JRE" (and even "JAR"), but not sure how reliable the results would be... any ideas, experiences on this one?
Regards, Damir
------------------------------
Damir Wilder
Senior Consultant
Triton Consulting
London
------------------------------