Starting or Connecting to DB2 - Cannot Load gsk8iccs.dll

When you starting DB2 or trying to connect to DB2 10.1 from an application on Windows 7/XP you can get the following error message in db2diag.log file:

2012-10-29-21.59.44.050000+180 I369700H505          LEVEL: Error
PID     : 16452                TID : 15132          PROC : sqldata.exe
INSTANCE: DB2                  NODE : 000
HOSTNAME: srv-dm1
EDUID   : 15132
FUNCTION: DB2 Common, Cryptography, cryptDynamicLoadGSKitCrypto, probe:998
MESSAGE : ECF=0x90000076=-1879048074=ECF_LIB_CANNOT_LOAD
          Cannot load the specified library
DATA #1 : unsigned integer, 4 bytes
70
DATA #2 : String, 34 bytes
C:\IBM\SQLLIB\bin\icc\gsk8iccs.dll

Reason - Changed Installation Path

When you run DB2 Installer it offers to install DB2 to C:\Program Files\IBM\SQLLIB directory by default. Often you change this path to something like C:\IBM\SQLLIB, but the installer still can write some other components to C:\Program Files\IBM\.

For example, the installer creates gsk8 and IBM SSH Server directories in C:\Program Files\IBM\ if you do not change their location.

Solution

When you get Cannot load the specified library - C:\IBM\SQLLIB\bin\icc\gsk8iccs.dll in the db2diag.log, do the following:

  • Create icc directory in C:\IBM\SQLLIB\bin
  • Copy the content of C:\Program Files\IBM\gsk8\lib to C:\IBM\SQLLIB\bin\icc

Note. Copy files only from gsk8\lib, do not copy directory lib with files to bin\icc

Resources

You could leave a comment if you were logged in.