Db2

Db2

Where DBAs and data experts come together to stop operating and start innovating. Connect, share, and shape the AI era with us.


#Data

 View Only
  • 1.  Db2 and the Java libraries...

    Posted 6 hours ago

    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
    ------------------------------


  • 2.  RE: Db2 and the Java libraries...

    Posted 2 hours ago
    Edited by Jan Nelken 2 hours ago

    -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?

    Well - all sticks usually have 3 ends: Correct, Incorrect and It Depends ...

    As far as I know:
    - JDBC requests (including connection requests) are translated into DRDA verbs by client driver - by the time those DRDA statements reach Server - they look just as any DRDA request;
    - java SP is executed (or rather interpreted) by JVM - which is created and later destroyed when needed within Db2 Server by using calls like CreateJavaVM() and DestroyJavaVM();

    Gentle correction from others would be welcomed - if I am wrong ...



    ------------------------------
    Jan Nelken
    Db2 (LUW) DBA
    Open for work
    Katowice or Krakow
    +48 783 109 863
    ------------------------------



  • 3.  RE: Db2 and the Java libraries...

    Posted 2 hours ago

    Hi Damir,

    Try this on the server as the instance owner:

    db2pd -fmpe

    https://www.ibm.com/docs/en/db2/12.1.x?topic=commands-db2pd-monitor-troubleshoot-db2-engine-activities#r0011729__smp-out-fmpexechistory



    ------------------------------
    Mark Barinstein
    ------------------------------