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 fixpacks. 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 (e.g. 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 step 1 above.

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.

Create a new JDK directory jdk64 under /opt/IBM/db2.
E.g.
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.

E.g.
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 user/group.

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

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

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

e.g.
db2 update dbm cfg using JDK_PATH /opt/IBM/db2/jdk64/



Instruction for IBM JDK Installation on Windows

User needs to login as user who is a member of the Db2 administration group (e.g. DB2ADMNS).

1) Stop all DB2 instances

2) Go to the DB2 installation directory
E.g
C:\Program Files\IBM\SQLLIB\java\jdk
(Note: For 32-bit install you may be using 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

This might not work as you might get the error of folder in-use. If that happens, try the following steps:

  • cd to C:\Program Files\IBM\SQLLIB\java\jdk\jre folder
  • rename bin to bin_old
  • copy lib as lib_old
  • cd to lib directory, delete all the files except the fonts folder (which might be held by windows svchost.exe process and might not be renamed)


3) Unzip 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 (i.e. the tool that validate files laid down by the DB2 installer at the system level, instance level, or database level after new installation) may 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 fixpack will overwrite 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 met:

  • No user created Java routines(stored procedure/user defined functions). DB2 does not include any built-in Java routines.
  • No JDBC applications using the JDK/JRE included with DB2. Some applications may include their own JDK/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 we upgrade the Java component on our DB2 deployments to a supported version of Java?

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

Original Publication Date

03 May 2018

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.7;10.1;10.5;11.1","Edition":"Advanced Enterprise Server;Advanced Workgroup Server;Enterprise Server;Express;Express-C;Personal;Workgroup Server","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
14 June 2019

UID

swg27050993