oracle 安装 sql loader linux

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/32231100/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 00:55:45  来源:igfitidea点击:

Install sql loader linux

oracleoracle11gsql-loader

提问by Masih

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

我尝试在 redhat 机器上安装 Oracle 即时客户端。我有 InstantClient basic、sdk 和 sqlplus,但我找不到任何 sqlldr。有人可以帮我做吗?谢谢

回答by Brice Roncace

Following the information @Alex Poole provided in his comment, I was able to add the sqlldrbinary 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 sqlldrbinary.

按照@Alex Poole 在他的评论中提供的信息,我能够将sqlldr二进制文件添加到 redhat linux 上的 Oracle 即时客户端安装中。关键是能够访问完整的 oracle 客户端(或数据库)安装,从中获取sqlldr二进制文件。

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

总而言之,这是我使用 Oracle 11.2.0.3.0 的过程:

Install Oracle Instant Client

安装 Oracle 即时客户端

Download from oracle instant client rpms:

从 oracle 即时客户端 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
  • 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

yum install oracle* --nogpgcheck

Create Oracle Environment Variables

创建 Oracle 环境变量

In /etc/profile.d/oracle.sh

/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

从完整的 Oracle 客户端/数据库复制 sqlldr 和消息文件

[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.msbfile from the Oracle database. But first we need to create the proper directory structure:

我们需要ulus.msb从 Oracle 数据库复制文件。但首先我们需要创建正确的目录结构:

[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!

成功!

回答by vesperto

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

安装oracle-instantclient12.2-tools,其中有sqlldr; 并确保您PATH包含/usr/lib/oracle/12.2/client64/bin.

Adjust versions accordingly.

相应地调整版本。

回答by Otto

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

接受的答案的更简单替代方案,不需要现有的完整客户端安装即可从以下位置窃取 sqlldr 二进制文件:

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

您可以在名为“Instant Client Package - Tools: Includes Data Pump、SQL*Loader和 Workload Replay Client”的单独即时客户端包中从 OTN 下载 SQL 加载器

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

这是 linux 的链接:适用于 Linux x86-64 的即时客户端下载