Redhat7-Oracle-sqlldr-安装配置

文件下载地址:
https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html

1.复制压缩包内的2个rpm文件到服务器上
Last login: Mon Mar 29 10:24:19 2021 from 10.131.62.64
[gframe@JZGZdaping12 ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.4 (Maipo)
[gframe@JZGZdaping12 ~]$ cd /home/data/tools/
[gframe@JZGZdaping12 tools]$ ll
-rw-r--r--. 1 root root 59865008 3月 5 16:47 oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm
-rw-r--r--. 1 root root 828333 3月 5 16:47 oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpm
-rw-r--r--. 1 gframe root 161109 3月 29 17:38 oracle-instantclient11.2-tools-11.2.0.4.0-1.x86_64.rpm
[gframe@JZGZdaping12 tools]$ rpm -ivh oracle-instantclient11.2-tools-11.2.0.4.0-1.x86_64.rpm

2.oracle-instantclient12.2-basic
[gframe@JZGZdaping12 tools]$ rpm -ivh oracle-instantclient11.2-tools-11.2.0.4.0-1.x86_64.rpm
错误:can't create 事务 lock on /var/lib/rpm/.rpm.lock (权限不够)
[gframe@JZGZdaping12 tools]$ su - root
密码:******
上一次登录:三 3月 24 16:20:29 CST 2021从 10.131.62.64pts/2 上
[root@JZGZdaping12 ~]# cd /home/data/tools/
[root@JZGZdaping12 tools]# ll
total 1188800
drwxr-xr-x. 2 gframe root 4096 Mar 4 10:27 11.2.0.4
-rw-r--r--. 1 gframe root 3816664 Mar 19 16:36 glibc-2.17-322.el7_9.x86_64.rpm
-rw-r--r--. 1 gframe root 1093785600 Feb 4 14:15 GNDP_NPM_2021204fxw.tar
-rw-r--r--. 1 gframe root 58066286 Mar 5 14:46 oracle-instantclient11.2-basic-11.2.0.4.0-1.i386.rpm
-rw-r--r--. 1 root root 59865008 Mar 5 16:47 oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm
-rw-r--r--. 1 gframe root 788835 Mar 5 14:44 oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.i386.rpm
-rw-r--r--. 1 root root 828333 Mar 5 16:47 oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpm
-rw-r--r--. 1 gframe root 161109 Mar 29 17:38 oracle-instantclient11.2-tools-11.2.0.4.0-1.x86_64.rpm
[root@JZGZdaping12 tools]# rpm -ivh oracle-instantclient11.2-tools-11.2.0.4.0-1.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:oracle-instantclient11.2-tools-11################################# [100%]

3.安装:oracle-instantclient12.2-tools-
[root@JZGZdaping12 tools]# rpm -ivh oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm
Preparing... ################################# [100%]
package oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64 is already installed
[root@JZGZdaping12 tools]#

4.添加环境变量,在文件末尾添加环境变量
[root@JZGZdaping12 tools]# vi /etc/profile
export PATH=/usr/lib/oracle/11.2/client64/bin:$PATH
export ORACLE_HOME=/usr/lib/oracle/11.2/client64/lib
export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib:$LD_LIBRARY_PATH
[root@JZGZdaping12 tools]# source /etc/profile
[root@JZGZdaping12 bin]# chmod 755 sqlldr
[root@JZGZdaping12 tools]# cd /usr/lib/oracle/11.2/client64
[root@JZGZdaping12 client64]# mkdir rdbms

sqlldr、mesg 找已安装Oracle服务到/bin 、rdbms目录下下载上传到已安装Oracle客户端服务器上

[root@JZGZdaping12 tools]# cp /home/data/tools/sqlldr /usr/lib/oracle/11.2/client64/bin
[root@JZGZdaping12 bin]# cp -r /home/data/tools/mesg /usr/lib/oracle/11.2/client64/rdbms

5.测试
/usr/lib/oracle/11.2/client64/rdbms/mesg
[root@JZGZdaping12 mesg]# sqlldr

SQL*Loader: Release 11.2.0.4.0 - Production on Mon Mar 29 20:22:31 2021

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


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

Valid Keywords:

userid -- ORACLE username/password
control -- control file name
log -- log file name
bad -- bad file name
data -- data file name
discard -- discard file name
discardmax -- number of discards to allow (Default all)
skip -- number of logical records to skip (Default 0)
load -- number of logical records to load (Default all)
errors -- number of errors to allow (Default 50)
rows -- number of rows in conventional path bind array or between direct path data saves
(Default: Conventional path 64, Direct path all)
bindsize -- size of conventional path bind array in bytes (Default 256000)
silent -- suppress messages during run (header,feedback,errors,discards,partitions)
direct -- use direct path (Default FALSE)
parfile -- parameter file: name of file that contains parameter specifications
parallel -- do parallel load (Default FALSE)
file -- file to allocate extents from
skip_unusable_indexes -- disallow/allow unusable indexes or index partitions (Default FALSE)
skip_index_maintenance -- do not maintain indexes, mark affected indexes as unusable (Default FALSE)
commit_discontinued -- commit loaded rows when load is discontinued (Default FALSE)
readsize -- size of read buffer (Default 1048576)
external_table -- use external table for load; NOT_USED, GENERATE_ONLY, EXECUTE (Default NOT_USED)
columnarrayrows -- number of rows for direct path column array (Default 5000)
streamsize -- size of direct path stream buffer in bytes (Default 256000)
multithreading -- use multithreading in direct path
resumable -- enable or disable resumable for current session (Default FALSE)
resumable_name -- text string to help identify resumable statement
resumable_timeout -- wait time (in seconds) for RESUMABLE (Default 7200)
date_cache -- size (in entries) of date conversion cache (Default 1000)
no_index_errors -- abort load on any index errors (Default FALSE)

PLEASE NOTE: Command-line parameters may be specified either by
position or by keywords. An example of the former case is 'sqlldr
scott/tiger foo'; an example of the latter is 'sqlldr control=foo
userid=scott/tiger'. One may specify parameters by position before
but not after parameters specified by keywords. For example,
'sqlldr scott/tiger control=foo logfile=log' is allowed, but
'sqlldr scott/tiger control=foo log' is not, even though the
position of the parameter 'log' is correct.
[root@JZGZdaping12 mesg]#

如出现以上信息表明,sqlldr 命令可以正常使用。

posted @ 2021-03-30 09:24  深海蓝精灵  阅读(449)  评论(0编辑  收藏  举报