我已经安装了Oracle Linux 6.5 64位,我想使用ODBC连接MSSQL Server。 我已经安装了unixODBC,然后安装了Driver Manager,我没有遇到任何问题。 我在odbc.ini文件中创建了一个DNS,并设置了我的odbcinst.ini
安装驱动程序管理器后的成功消息
[root@MV-OBI-LINUX sqlncli-11.0.1790.0]# odbcinst -q -d -n "SQL Server Native Client 11.0"
[SQL Server Native Client 11.0]
Description=Microsoft SQL Server ODBC Driver V1.0 for Linux
Driver=/opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.1790.0
UsageCount=4
Threading=1
FIRST ERROR
[root@MV-OBI-LINUX sqlncli-11.0.1790.0]# isql -v msPreflex userbd grup0r0c10
[01000][unixODBC][Driver Manager]Can't open lib '/opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.1790.0' : file not found
[ISQL]ERROR: Could not SQLConnect
第二个错误
[root@MV-OBI-LINUX sqlncli-11.0.1790.0]# sqlcmd -$172.16.1.141 -userbd -grup0r0c10
sqlcmd: error while loading shared libraries: libcrypto.so.6: cannot open shared object file: No such file or directory
ODBC.INI
[msPreflex]
Driver=SQL Server Native Client 11.0
Description=Prueba Preflex
Trace=Yes
Server=172.16.1.141
Port=1433
Database=Preflex
ODBCINST.INI
[SQL Server Native Client 11.0]
Description=Microsoft SQL Server ODBC Driver V1.0 for Linux
Driver=/opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.1790.0
UsageCount=4
Threading=1
答案 0 :(得分:1)
cd /usr/lib64
ll libodbcinst.so.1 libodbc.so.1
lrwxrwxrwx 1 root root 20 Nov 23 11:34 libodbcinst.so.1 -> libodbcinst.so.2.0.0
lrwxrwxrwx 1 root root 16 Nov 23 11:20 libodbc.so.1 -> libodbc.so.2.0.0
这个链接在/ usr / lib64中非常重要 但链接取决于你的odbc包的版本