IBM Support

Instructions for IBM JDK Installation for a security related fix

Product Documentation


Abstract

Applying a Java security fix could sometimes require a manual installation procedure if the fix is released in between DB2 fix packs. The instructions outlined in this topic provide the steps for IBM JDK installation on Unix/Linux and Windows.

Content

Instruction for IBM JDK Installation on Unix/Linux
On Unix, the installFixPack tool will fail if you install in place. Fix pack update to new installation path is not affected.

1) Create a new temporary JDK directory (for example, jdk64_tmp), to store the extracted install files.

2) Run the following command to extract all the files from the IBM JDK install image tar file into the temporary JDK directory created in the previous step.

tar -xvf <IBM JDK install image tar file> -C <Temporary JDK directory>


3) Stop all DB2 instances for the installation.

4) As root user, create a new JDK directory under /opt/ibm/db2

mkdir /opt/ibm/db2/jdk64


5) As root user, copy the extracted files from the temporary JDK directory created in step 1 to the new JDK directory.

cp -R <Temporary JDK directory>/* /opt/IBM/db2/jdk64/


Check that the files in the /opt/IBM/db2/jdk64/ directory have r-x permission for the user and group permissions.

6) Change the group and owner for all the files in the new JDK directory to bin.

chgrp -R bin /opt/IBM/db2/jdk64/
chown -R bin /opt/IBM/db2/jdk64/


7) Update your class path for Java Applications and configure DB2 to use the new JDK:

db2 update dbm cfg using JDK_PATH /opt/IBM/db2/jdk64/





Instruction for IBM JDK Installation on Windows

User needs to log in as user who is a member of the Db2 administration group (for example, DB2ADMNS).

1) Stop all DB2 instances

2) Go to the DB2 installation directory

For Example:

C:\Program Files\IBM\SQLLIB\java\jdk

Note: 32-bit Db2 installs on 64-bit Windows will be under Program Files (x86):

C:\Program Files (x86)\IBM\SQLLIB\java\jdk


Rename the following folders:

  • bin to bin_old
  • include to include_old
  • lib to lib_old
  • properties to properties_old
  • jre to jre_old

2.1) If a folder in use error occurs, try the following steps

  • Change directories to C:\Program Files\IBM\SQLLIB\java\jdk\jre
  • Rename bin to bin_old
  • Copy lib to lib_old
  • Change to the lib directory
  • Delete all the files except the fonts folder
    • The fonts folder might be held by the svchost.exe process and is not able to be renamed.


3) Extract the new Java files. Copy all extracted files from under the sdk directory in the .zip file to the  jdk directory under the Db2 installation directory.


Notes:

1) With this update, the metadata of the new JDK is not being recorded with the installer. Hence, for fix pack update in the same installation path, execution of the db2val utility (the tool that validates files laid down by the DB2 installer at the system level, instance level, or database level after new installation) might fail even though the installation succeeded. Fix pack update to new installation path is not affected.

2) Uninstall will not be able to remove the jdk64 and jdk64_tmp folder, user will have to remove it manually.

3) Installing a new fix pack overwrites the Java directory. If you need a different version of Java, you will have to follow the installation steps again.

FAQ

Q1) Can the JDK be removed instead of upgraded?

Yes, if following conditions are met:

  • No user created Java routines (stored procedures or user defined functions) exist. DB2 does not include any built-in Java routines.
  • No JDBC applications are using the JDK/JRE included with DB2. Some applications might include their own JDK or JRE in another directory outside of the one in /opt/IBM/db2/jdk64/ (Unix/Linux) or C:\Program Files\IBM\SQLLIB\Java\jdk (Windows)

Use this query to find any Java routines used by DB2

select routineschema, routinename from syscat.routines where language='JAVA'

Q2) Can the old version of Java be removed after the new version of Java is installed?

Yes, the older version of Java can be deleted when it is no longer in use.

Q3) Can we upgrade the Java component on our DB2 deployments to a supported version of Java?

Yes, JDK downloads here and the following links provide information regarding JDK level support for each release to create Java applications and routines:

You may also find the latest JDK downloads at https://www.ibm.com/support/pages/java-sdk-downloads-version-80

Original Publication Date

03 May 2018

[{"Type":"MASTER","Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"ARM Category":[{"code":"a8m0z000000XasLAAS","label":"Java"},{"code":"a8m500000008PmjAAE","label":"Routines - Stored Procedures and UDF-\u003EJava\/Non-SQL Routines"},{"code":"a8m500000008PmrAAE","label":"Security and Plug-Ins-\u003ESecurity Vulnerability"}],"ARM Case Number":"","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"All Versions"}]

Document Information

Modified date:
24 January 2024

UID

swg27050993