Odbc

本機 Sybase ODBC 驅動程序

  • May 14, 2021

我確實在我的 Linux 機器上安裝了最新的 Sybase 16 開發版本。在安裝過程中,我確實選擇了安裝 ODBC 驅動程序。

現在查看目錄,我看到了:

igor@IgorReinCloud /opt $ find . -name *odbc*
./sap/DataAccess/bin/odbcversion
./sap/DataAccess/ODBC/samples/odbcbatch
./sap/DataAccess/ODBC/samples/odbcbatch/odbcbatch.cpp
./sap/DataAccess/ODBC/samples/odbcloblocator
./sap/DataAccess/ODBC/samples/odbcloblocator/odbcloblocator.cpp
./sap/DataAccess/ODBC/sp/odbc_mda_120.sql
./sap/DataAccess/ODBC/sp/odbc_mda_157.sql
./sap/DataAccess/ODBC/sp/odbc_mda_1251.sql
./sap/DataAccess/ODBC/sp/odbc_mda_1600000.sql
./sap/DataAccess/ODBC/sp/install_odbc_sprocs
./sap/DataAccess/ODBC/sp/odbc_mda_1570020.sql
./sap/DataAccess/ODBC/sp/odbc_mda_125.sql
./sap/DataAccess/ODBC/sp/odbc_mda_12503.sql
./sap/DataAccess/ODBC/sp/odbc_mda_150.sql
./sap/DataAccess/ODBC/sp/odbc_mda_1502.sql
./sap/DBISQL-16_0/lib/jodbc4.jar
./sap/DBISQL-16_0/bin/libdbodbc16_r.so.1
./sap/DBISQL-16_0/bin/libdbodbc16_r.so
./sap/DBISQL-16_0/bin/libdbjodbc16.so.1
./sap/DBISQL-16_0/bin/libdbjodbc16.so
./sap/ASE-16_0/lib/pca/libPCAodbc.so
./sap/ASE-16_0/symlib/pca/libPCAodbc.so
./sap/COCKPIT-4/bin/sa16/linux64/java/jodbc4.jar
./sap/COCKPIT-4/bin/sa16/linux64/lib64/libdbodbc16_r.so
./sap/COCKPIT-4/bin/sa16/linux64/lib64/libdbodbc16.so
./sap/COCKPIT-4/bin/sa16/linux64/lib64/libdbjodbc16.so
./sap/log/odbc.log
./sap/log/odbc.lst
./sap/DataAccess64/bin/odbcversion
./sap/DataAccess64/ODBC/dm/include/unixodbc.h
./sap/DataAccess64/ODBC/dm/include/odbc.h
./sap/DataAccess64/ODBC/dm/include/saodbc.h
./sap/DataAccess64/ODBC/dm/lib64/libodbc.so
./sap/DataAccess64/ODBC/samples/odbcbatch
./sap/DataAccess64/ODBC/samples/odbcbatch/odbcbatch.cpp
./sap/DataAccess64/ODBC/samples/odbcloblocator
./sap/DataAccess64/ODBC/samples/odbcloblocator/odbcloblocator.cpp
./sap/DataAccess64/ODBC/sp/odbc_mda_120.sql
./sap/DataAccess64/ODBC/sp/odbc_mda_157.sql
./sap/DataAccess64/ODBC/sp/odbc_mda_1251.sql
./sap/DataAccess64/ODBC/sp/odbc_mda_1600000.sql
./sap/DataAccess64/ODBC/sp/install_odbc_sprocs
./sap/DataAccess64/ODBC/sp/odbc_mda_1570020.sql
./sap/DataAccess64/ODBC/sp/odbc_mda_125.sql
./sap/DataAccess64/ODBC/sp/odbc_mda_12503.sql
./sap/DataAccess64/ODBC/sp/odbc_mda_150.sql
./sap/DataAccess64/ODBC/sp/odbc_mda_1502.sql

所以對於我正在尋找的司機:

./sap/DBISQL-16_0/bin/libdbodbc16_r.so.1
./sap/DBISQL-16_0/bin/libdbodbc16_r.so

那兩個文件,對嗎?

所以在配置的時候,我會放入odbcinst.ini:

[Sybase]
Driver=/opt/sap/DBISQL-16_0/bin/libdbodbc16_r.so

正確的?

謝謝你。

PS:只是好奇,庫文件名中的“_r”是什麼意思?這不是我第一次看到…

只要驅動程序位於庫路徑中,您實際上不必指定 ODBC 驅動程序。

[MyIQboxOfDoom] 
CommLinks=tcpip(ip=myiqboxofdoom;port=5000;DOBROADCAST=NONE;VERIFY=NO)
AutoStop=no

並使用連接

dbisql -c "dsn=MyIQboxOfDoom;uid=myuser;pwd=mypass" -nogui

引用自:https://dba.stackexchange.com/questions/162029