Install sql loader linux

Following the information @Alex Poole provided in his comment, I was able to add the sqlldr binary to an Oracle instant client installation on redhat linux. The key is to have access to a full oracle client (or database) installation from which to obtain the sqlldr binary.

In summary here was the process I took with Oracle 11.2.0.3.0:

Install Oracle Instant Client

Download from oracle instant client rpms:

  • oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm
  • oracle-instantclient11.2-jdbc-11.2.0.3.0-1.x86_64.rpm
  • oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm
  • oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64.rpm

Install:

yum install oracle* --nogpgcheck

Create Oracle Environment Variables

In /etc/profile.d/oracle.sh

export ORACLE_HOME=/usr/lib/oracle/11.2/client64
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export TNS_ADMIN=$ORACLE_HOME/network/admin

Copy sqlldr and message file from full Oracle client/database

[root@redhat bin]# pwd
/usr/lib/oracle/11.2/client64/bin
[root@redhat bin]# scp root@oracleServer:/OracleHome/db/product/11gR2/bin/sqlldr .

Try it:

[root@redhat bin]# sqlldr
Message 2100 not found; No message file for product=RDBMS, facility=ULMessage 2100 not found; No message file for product=RDBMS, facility=UL

We need to copy over the ulus.msb file from the Oracle database. But first we need to create the proper directory structure:

[root@redhat client64]# pwd
/usr/lib/oracle/11.2/client64
[root@redhat client64]# mkdir -p rdbms/mesg
[root@redhat client64]# scp root@oracleServer:/OracleHome/db/product/11gR2/rdbms/mesg/ulus.msb rdbms/mesg/

With the message file in place, try again:

[root@redhat client64]# sqlldr

SQL*Loader: Release 11.2.0.3.0 - Production on Tue Oct 20 10:12:55 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Usage: SQLLDR keyword=value [,keyword=value,...]
....

Success!


Install oracle-instantclient12.2-tools, which has sqlldr; and make sure your PATH includes /usr/lib/oracle/12.2/client64/bin.

Adjust versions accordingly.