我已下载,构建和配置
unixODBC-2.3.2.tar
我安装了:
oracle-instantclient12.1-odbc-12.1.0.2.0-1.x86_64.rpm
oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
oracle-instantclient12.1-sqlplus-12.1.0.2.0-1.x86_64.rpm
我按如下方式配置了/usr/local/etc/odbcinst.ini:
[Oracle]
Description = Oracle ODBC Connection
Driver = /usr/lib/oracle/12.1/client64/lib/libsqora.so.12.1
Setup =
FileUsage =
libsqora.so.12.1文件存在:
file /usr/lib/oracle/12.1/client64/lib/libsqora.so.12.1
/usr/lib/oracle/12.1/client64/lib/libsqora.so.12.1: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped
我还配置了odbc.ini文件:
[prd_db]
Driver=Oracle
Description=prod database
Trace=Yes
ServerName=//prddb01:1521/dbp01_svc1
当我使用prd_db credentilas使用isql进行连接时:
isql prd_db
我收到连接错误。用户名和密码准确无误,我可以使用sql developer连接。
我错过了什么?我需要在linux服务器上配置odbc连接。ldd /usr/lib/oracle/12.1/client64/lib/libsqora.so.12.1
linux-vdso.so.1 => (0x00007fffd918b000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f6c73bb2000)
libm.so.6 => /lib64/libm.so.6 (0x00007f6c73939000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6c7371b000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f6c73503000)
librt.so.1 => /lib64/librt.so.1 (0x00007f6c732fa000)
libclntsh.so.12.1 => not found
libodbcinst.so.2 => /usr/local/lib/libodbcinst.so.2 (0x00007f6c730e8000)
libc.so.6 => /lib64/libc.so.6 (0x00007f6c72d6c000)
/lib64/ld-linux-x86-64.so.2 (0x00007f6c74242000)
libltdl.so.7 => /usr/lib64/libltdl.so.7 (0x00007f6c72b61000)