IBM Support

'Specified driver could not be loaded due to system error 5'

Troubleshooting


Problem

C# (or OLE DB, or ODBC) application is failing with either 'Specified driver could not be loaded due to system error 5' or 'Specified driver could not be loaded due to system error 1114'

Symptom

C# (or OLE DB, or ODBC) application is failing with either
'Specified driver could not be loaded due to system error 5'
or
'Specified driver could not be loaded due to system error 1114'

Cause

'System error 5' is a Windows permission issue, while 'System error 1114' is a DLL initialization error. In both cases, referring to db2cli.dll and db2odbc.dll. Either error means that the ID that the application is running under does not have

  • Read & Execute
  • List Folder Contents
  • Read
permissions on SQLLIB and it's subdirectories.

Diagnosing The Problem

C# (or OLE DB, or ODBC) application is failing with either
'Specified driver could not be loaded due to system error 5'
or
'Specified driver could not be loaded due to system error 1114'

This problem can also arise with the Microsoft Internet Information Server (IIS).

Resolving The Problem

Grant the application UserID

  • Read & Execute
  • List Folder Contents
  • Read
permissions on SQLLIB and it's subdirectories. The UserID also needs the above permissions on all of the parent directories. Note that the permissions do not have to be inherited by the Child Objects.

For example, if DB2 is installed to
    C:\Program Files\IBM\SQLLIB
then the above permissions must be granted on
  • C:\
  • C:\Program Files
  • C:\Program Files\IBM
  • C:\Program Files\IBM\SQLLIB
The permissions do not need to be inherited to the Child Objects except for the SQLLIB directory. The permissions need to be granted on 'C;\Program Files\IBM', but not on any other sub-directory of 'C;\Program Files'.

If Microsoft Internet Information Service (IIS) is the application, then the UserIDs include
  • IUS*
  • ASP*
  • IWAM*
If IIS is using dedicated application pools, then setting them to run as 'Local System" should grant the required permissions.

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Programming Interface - ODBC","Platform":[{"code":"PF033","label":"Windows"}],"Version":"9.7;9.5;9.1","Edition":"Enterprise Server;Express;Personal;Personal Developer's;Workgroup Server","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
23 June 2018

UID

swg21403672