Install sql loader linux
Asked Answered
V

3

8

I tried to install Oracle instant client on a redhat machine. I have instantClient basic, sdk, and sqlplus but I could not find any sqlldr. Can some one help me do it? Thanks

Valenba answered 26/8, 2015 at 15:45 Comment(4)
sqlldr is part of the server installation.Bathyscaphe
At oracle.com/technetwork/database/features/instant-client/… sqlldr is not listed as being a component of the instant client. It is probably available with the full client install.Lilith
@ShannonSeverance, Where can I find full client?Valenba
It's sort of possible to add SQL*Loader to Instant Client, apparently - I haven't tried and am not advocating that. But you'd need the full client anyway; you can get that from the database installer, so you might as well just use that. Before you do, have you considered using external tables instead?Rainwater
G
19

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!

Granvillegranvillebarker answered 20/10, 2015 at 19:53 Comment(1)
Works, but some of the steps are not needed. You can just use the basic client zip file, without needing to install anything: With the instantclient-basic-linux.x64-12.1.0.2.0.zip extracted to ./instantclient/, all that you need to do is to add the folder ./instantclient/rdbms/mesg/ folder and the file ./instantclient/rdbms/mesg/ulus.msb, and then add the ./instantclient folder to both your PATH and LD_LIBRARY_PATH variables.Calumny
C
2

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

Adjust versions accordingly.

Cnossus answered 9/1, 2019 at 15:46 Comment(1)
You'll probably also need to ensure that your library path includes a reference to the lib directory as well i.e. export LD_LIBRARY_PATH=/usr/lib/oracle/12.2/client64/libDeceit
C
1

Simpler alternative to the accepted answer that does not require an existing full client install to steal the sqlldr binary from:

You can download SQL loader from OTN in a separate instant client package called "Instant Client Package - Tools: Includes Data Pump, SQL*Loader and Workload Replay Client"

Here is the link for linux: Instant Client Downloads for Linux x86-64

Cabbagehead answered 30/1, 2018 at 16:27 Comment(1)
When adding an answer to an older question with an existing accepted answer it can be helpful to discuss how your answer differs and what new information it brings to the question. For example is the link that you provide a better one that the one that Alex left in his comment?Ful

© 2022 - 2024 — McMap. All rights reserved.