osql无法在odb.ini文件中找到驱动程序

时间:2017-07-13 10:39:05

标签: sql linux ubuntu odbc freetds

我的freetds.conf文件:

 SELECT '01-APR-'
 ||TO_CHAR((add_months(**sysdate**,-3)),'YYYY') FIN_YEAR_START_DATE,
 '31-MAR-'
 ||(TO_CHAR((add_months(**sysdate**,-3)),'YYYY')+1) FIN_YEAR_END_DATE
 FROM dual;

我的odbc.ini文件

    [global]
        # TDS protocol version
;   tds version = 7.4

# A typical Sybase server
[egServer50]
    host = symachine.domain.com
    port = 5000
    tds version = 5.0

# A typical Microsoft server
[ABC]
    host = IP address
    port = 1433
    tds version = 7.4

我的odbcinst.ini文件:

     [ABC]

    Driver = FreeTDS
    Description = ODBC connection via FreeTDS
    Trace = No
    Server = IP address
    port = 1433
    Database = DA_DB
    TDS_Version = 7.4

[default]

Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so

osql的输出是

 [FreeTDS]
Description = TDS driver (MS SQL)
# Some installations may differ in the paths
#Driver = /usr/lib/odbc/libtdsodbc.so
#Setup = /usr/lib/odbc/libtdsS.so
Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so
CPTimeout =
CPReuse =
FileUsage = 1

这里无法理解问题。我正在从ubuntu 16.04运行这些代码。请提出任何可能存在问题的建议......

0 个答案:

没有答案