English

Error: ORA-06522: ld.so.1: extproc: fatal: libclntsh.so.11.1: open failed: No such file or directory

Error Message

While executing a SQL query to access an ST_Geometry function against an Oracle 10g database with an ArcGIS geodatabase at 10.1 Service Pack 1 Quality Improvement Patch and later, running on a Linux/UNIX operating system, the following error is returned:

SQL> select sde.st_point(0,0,0) from dual; 
select sde.st_point(0,0,0) from dual
*
ERROR at line 1:
ORA-06520: PL/SQL: Error loading external library
ORA-06522: ld.so.1: extproc: fatal: libclntsh.so.11.1: open failed: No such
file or directory
ORA-06512: at "SDE.ST_GEOMETRY_SHAPELIB_PKG", line 12
ORA-06512: at "SDE.ST_POINT", line 176

This issue is resolved with the Oracle-specific shape library included in the ArcGIS 10.2.1 Utility Patch 2 and at ArcGIS 10.3.

Cause

The ST_Geometry library files for ArcGIS 10.1 Service Pack 1 Quality Improvement Patch and later do not support the Oracle 10g library for Linux/UNIX operating systems. This is due to particular builds of the ST_Geometry library file expecting the Oracle 11g client library (libclntsh.so.11.1).

The ldd command, to list dynamic dependencies of executable files or shared objects, can be used to check the expected client library file as shown below:

MyOracleHost% cd $SDEHOME/lib
MyOracleHost% ldd libst_shapelib.so
libclntsh.so.11.1 => (file not found)
libCrun.so.1 => /usr/lib/64/libCrun.so.1
libc.so.1 => /lib/64/libc.so.1
libm.so.2 => /lib/64/libm.so.2
/lib/sparcv9/../libm/sparcv9/libm_hwcap1.so.2
/platform/SUNW,SPARC-Enterprise/lib/sparcv9/libc_psr.so.1

Solution or Workaround

To resolve this a symbolic (soft) link named libclntsh.so.11.1 can be created that points to the 10g version of the client library (libclntsh.so.10.1) as shown below:

ln -s /path/to/file /path/to/symlink

Example:

MyOracleHost% ln -s $ORACLE_HOME/lib/libclntsh.so.10.1 $ORACLE_HOME/lib/libclntsh.so.11.1