问题现象
在使用orato8a导出数据过程中报错./orato8a: error while loading shared libraries: libclntsh.so.11.1: cannot open shared object file: No such file or directory,
报错./orato8a: error while loading shared libraries: libHbaseThrift.so.0: cannot open shared object file: No such file or directory等。
解决方法
使用orato8a-8.6.2.11-R3-redhat6.2-x86_64在oracle server服务器上进行测试。
- 报错找不到libclntsh.so.11.1
#./orato8a --user=‘ora01/111111@orcl’ --query=“select c1,c2 FROM t” --file=‘/opt/orato8a_output/t.txt’ --field=“;” --format=3
./orato8a: error while loading shared libraries: libclntsh.so.11.1: cannot open shared object file: No such file or directory
在LD_LIBRARY_PATH中添加libclntsh.so.11.1所在路径。
#export LD_LIBRARY_PATH=/home/oracle/app/oracle/product/11.2.0/dbhome_1/lib
- 报错找不到libHbaseThrift.so.0
#./orato8a --user=‘ora01/111111@orcl’ --query=“select c1,c2 FROM t” --file=‘/opt/orato8a_output/t.txt’ --field=“;” --format=3
#./orato8a: error while loading shared libraries: libHbaseThrift.so.0: cannot open shared object file: No such file or directory
libHbaseThrift.so.0是orato8a安装包中自带的lib库,在LD_LIBRARY_PATH中添加libHbaseThrift.so.0所在路径。
export LD_LIBRARY_PATH=/home/oracle/app/oracle/product/11.2.0/dbhome_1/lib:/opt/setup/orato8a-8.6.2.11-R3
- 报错FAILED: OCIEnvCreate()
#./orato8a --user=‘ora01/111111@orcl’ --query=“select c1,c2 FROM t” --file=‘/opt/orato8a_output/t.txt’ --field=“;” --format=3
FAILED: OCIEnvCreate()
FAILED: init_handles()[-1]
添加ORACLE_HOME
export ORACLE_BASE=/home/oracle/app
export ORACLE_HOME=$ORACLE_BASE/oracle/product/11.2.0/dbhome_1