IBM Support

DataStage job fails while trying to load library libclntsh.xx due to file not found or permission denied.

Troubleshooting


Problem

The following errors may occur when running a DataStage server job with the OCI plug-in that uses the Oracle client: ds_loadlibrary: error in dlopen of oraoci9.so - ld.so.1: uvsh: fatal: libclntsh.sl: Permission denied ds_loadlibrary: error in dlopen of oraoci9.so - ld.so.1: uvsh: fatal: libclntsh.so: open failed: No such file or directory

Resolving The Problem

When a DataStage job attempts to access an Oracle database via the Oracle runtime client, the DataStage userid who runs the job must have permission to access/execute the files in the Oracle client directories, and the LIBPATH (or LD_LIBRARY_PATH or SHLIB_PATH) must include the directory containing the Oracle client library files. The following errors occur when file permissions or library path are not configured correctly:

ds_loadlibrary: error in dlopen of oraoci9.so - ld.so.1: uvsh: fatal: libclntsh.sl: Permission denied



This error indicates that the DataStage user running the failing job does not have permission to execute Oracle library files including those in the $ORACLE_HOME/lib or $ORACLE_HOME/lib32 directories.

To resolve this permission issue, the system administrator could grant public read and execute permission for the oracle run-time client. Alternatively, the failing job can be run from a userid which has read and execute privileges for the Oracle client via owner or group permission.

ds_loadlibrary: error in dlopen of oraoci9.so - ld.so.1: uvsh: fatal: libclntsh.so: open failed: No such file or directory



This error indicates that either the DataStage user has no read permission at all to the Oracle client files, or more likely that the library path has not been correctly configured. The dsenv file:
.../IBM/InformationServer/Server/DSEngine/dsenv
needs to setup the library path to include $ORACLE_HOME/lib directory (also ensure that $ORACLE_HOME is defined). On AIX, this is done by updating and exporting the LIBPATH environment variable in desnv. For Solaris and Linux, you will need to use LD_LIBRARY_PATH, and on HP-UX you will need to use SHLIB_PATH instead of LIBPATH.

To confirm your dsenv file defines the library path correctly, you can perform the following steps:
  1. Change to your $DSHOME directory. If $DSHOME is not defined, locate and change directory to your DataStage engine directory, i.e.: .../IBM/InformationServer/Server/DSEngine
  2. Run the dsenv script. Ensure the command includes the leading period + space as shown below:
    . dsenv
  3. Check the value of LIBPATH (or LD_LIBRARY_PATH or SHLIB_PATH):
    echo $LIBPATH
  4. Confirm that your library path includes the lib or lib32 directory for your Oracle run-time client.

Under some conditions, it is possible that a DataStage job may not run with the same environment variable settings defined by dsenv (such as when project or job variables override the default environment variables). To confirm the value of these settings at the time of job failure, you can output the "full detail" job log from the DataStage Director client. This log will include the value of all defined system environment variables.

[{"Product":{"code":"SSVSEF","label":"IBM InfoSphere DataStage"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"9.1;8.7;8.5;8.1;8.0.1;11.3","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
23 June 2018

UID

swg21411033