In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
It takes a long time to install the Oracle client, and most of the functions are not needed. Oracle officially gives a simple client, which can be used directly after decompression. Download address: http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
Let's look at the installation steps:
1. Download the installation package. I have downloaded everything here.
Instantclient-basic-linux.x64-12.2.0.1.0.zip
Instantclient-basiclite-linux.x64-12.2.0.1.0.zip
Instantclient-jdbc-linux.x64-12.2.0.1.0.zip
Instantclient-odbc-linux.x64-12.2.0.1.0-2.zip
Instantclient-sdk-linux.x64-12.2.0.1.0.zip
Instantclient-sqlplus-linux.x64-12.2.0.1.0.zip
Instantclient-tools-linux.x64-12.2.0.1.0.zip
2. Decompress unzip
Extract a directory instantclient_12_2
3. Configure environment variables
Export ORACLE_HOME=/home/tst1/instantclient_12_2
Export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME
Export PATH=$ORACLE_HOME:$PATH
4. Configure tns
[tst1@rhel7 instantclient_12_2] $mkdir-p network/admin [tst1@rhel7 instantclient_12_2] $cd network/admin/ [tst1@rhel7 admin] $cat tnsnames.ora ora11g = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.56.22) (PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ora11g)
5. Test sqlplus successfully
[tst1@rhel7 admin] $sqlplus zx/zx@ora11gSQL*Plus: Release 12.2.0.1.0 Production on Thu Nov 16 12:48:33 2017Copyright (c) 1982, 2016, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL >
6. Install sqlldr. There is sqlldr in this version of the simple client I installed. If not, you need to copy it from other clients or servers. However, I test and execute the sqlldr error report:
[tst1@rhel7 instantclient_12_2] $sqlldrMessage 2100 not found; No message file for product=RDBMS, facility=ULMessage 2100 not found; No message file for product=RDBMS, facility=UL [tst1@rhel7 instantclient_12_2] $
Because the mesg file is missing, copy all the files under the rdbms/mesg from the server.
[tst1@rhel7 instantclient_12_2] $mkdir-p rdbms/mesg [tst1@rhel7 instantclient_12_2] $cp / u01PlacleUniverse productUniplicate12.2anddbroomhome1 @ rdbmsUnix mesg * rdbms/mesg/
Sqlldr executed again successfully
7. Install oerr. There is no oerr command in the simple client, so you need to copy it from the server.
[tst1@rhel7 instantclient_12_2] $cp / u01/app/oracle/product/12.2/db_home1/bin/oerr. / [tst1@rhel7 instantclient_12_2] $oerr/home/tst1/instantclient_12_2/oerr: line 29: / home/tst1/instantclient_12_2/perl/bin/perl: No such file or directory
Execute an error report indicating that the file is missing and copy it from the server
[tst1@rhel7 instantclient_12_2] $cp-r / u01 oerr ora 1Can't open perl script home/tst1/instantclient_12_2/bin/oerr.pl *. / [tst1@rhel7 instantclient_12_2] $cp-r / u01 null home/tst1/instantclient_12_2/bin/oerr.pl *. / [null) [tst1] @ rhel7 instantclient_12_2] $mkdir bin [tst1@rhel7 instantclient_12_2] $scp / u01/app/oracle/product/12.2/db_home1/bin/oerr.pl. / bin/ [tst1@rhel7 instantclient_12_2] $oerr ora 1Could not open facilities list file: / home/tst1/instantclient_12_2/lib/facility.lis2 [tst1@rhel7 instantclient_12_2] $mkdir lib [tst1@rhel7 instantclient_12_2] $cp / u01/app/oracle/product/ 12.2/db_home1/lib/facility.lis. / lib/ [tst1@rhel7 instantclient_12_2] $oerr ora 100001 00000, "unique constraint (% s% s) violated" / / * Cause: An UPDATE or INSERT statement attempted to insert a duplicate key.// For Trusted Oracle configured in DBMS MAC mode, you may see// this message if a duplicate entry exists at a different level.// * Action: Either remove the unique restriction or do not insert the key.
Note: oerr also uses the files in the rdbms/mesg directory, but step 6 copies the entire directory, which is easy here.
8. Install tnsping. This tool is not available in the simple installation package and needs to be copied from the server.
[tst1@rhel7 instantclient_12_2] $cp / u01/app/oracle/product/12.2/db_home1/bin/tnsping. / [tst1@rhel7 instantclient_12_2] $tnspingTNS Ping Utility for Linux: Version 12.2.0.1.0-Production on 16-NOV-2017 13:09:12Copyright (c) 1997, 2016, Oracle. All rights reserved.TNS-03502: Message 3502 not found; No message file for product=network, facility=TNS
Execute an error because the mesg file is missing
[tst1@rhel7 instantclient_12_2] $cp-r / u01/app/oracle/product/12.2/db_home1/network/mesg/. / network/ [tst1@rhel7 instantclient_12_2] $tnsping 192.168.56.22:1521/ora11gTNS Ping Utility for Linux: Version 12.2.0.1.0-Production on 16-NOV-2017 13:11:04Copyright (c) 1997, 2016, Oracle. All rights reserved.Used parameter files:Used HOSTNAME adapter to resolve the aliasAttempting to contact (DESCRIPTION= (CONNECT_DATA= (SERVICE_NAME=ora11g)) (ADDRESS= (PROTOCOL=TCP) (HOST=192.168.56.22) (PORT=1521) OK (10 msec)
Installation succeeded.
9. Install exp, imp, expdp and impdp, which are not included in the installation package. Copy them directly from the server.
[tst1@rhel7 instantclient_12_2] $cp / u01/app/oracle/product/12.2/db_home1/bin/imp. / [tst1@rhel7 instantclient_12_2] $cp / u01/app/oracle/product/12.2/db_home1/bin/exp. / [tst1@rhel7 instantclient_12_2] $cp / u01/app/oracle/product/12.2/db_home1/bin/impdp. / [tst1@rhel7 instantclient_12_2] $cp / u01/app/oracle / product/12.2/db_home1/bin/expdp. /
There is no problem with the imp and exp tests, but expdp and impdp report errors:
[tst1@rhel7 instantclient_12_2] $expdpSegmentation fault [tst1@rhel7 instantclient_12_2] $impdpSegmentation fault
Query MOS to find a solution and add export NLS_LANG=American_America.ZHS16GBK to the environment variable
Problem solved.
At this point, the simple client installation is complete, you can package the entire directory and decompress it directly to other machines during installation, and the configuration environment variables can be used. It is much more convenient than installing the client.
Note:
If you use a tool to report missing library files, you can use the ldd command to see which library files are missing from that command, as follows:
[root@host77 instantclient_11_2] # ldd sqlldr linux-vdso.so.1 = > (0x00007fffe63fe000) libclntsh.so.11.1 = > not found libnnz11.so = > not found libpthread.so.0 = > / lib64/libpthread.so.0 (0x00007f014b85c000) libdl.so.2 = > / lib64/libdl.so.2 (0x00007f014b658000) libm.so.6 = > / lib64/libm.so.6 (0x00007f014b355000) libnsl.so .1 = > / lib64/libnsl.so.1 (0x00007f014b13c000) libc.so.6 = > / lib64/libc.so.6 (0x00007f014ad7b000) / lib64/ld-linux-x86-64.so.2 (0x00007f014ba8b000)
From the output above, you can see that the libclntsh.so.11.1 and libnnz11.so files are missing. Just copy them from the server.
Reference: http://hanqunfeng.iteye.com/blog/1955277
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.