FreeTDS不';不要使用已配置的tds版本 freetds v0.91-tds版本不匹配

FreeTDS不';不要使用已配置的tds版本 freetds v0.91-tds版本不匹配,freetds,Freetds,我想用Ubuntu 14.04上的FreeBSD连接到Windows SQL Server。 FreeTDS是使用apt get安装的。 我使用以下命令尝试了不同的tds版本: $TDSVER=7.0tsql-hxxx.xxx.xxx.xxx-uxxxx-p1433-pxxxxxxx ... iconv.c:384:tds_iconv_open: done net.c:216:Connecting to xxx.xxx.xxx.xxx port 1433 (TDS version 7.4) ne

我想用Ubuntu 14.04上的FreeBSD连接到Windows SQL Server。 FreeTDS是使用apt get安装的。 我使用以下命令尝试了不同的tds版本:

$TDSVER=7.0tsql-hxxx.xxx.xxx.xxx-uxxxx-p1433-pxxxxxxx

...
iconv.c:384:tds_iconv_open: done
net.c:216:Connecting to xxx.xxx.xxx.xxx port 1433 (TDS version 7.4)
net.c:242:tds_open_socket: connect(2) returned "Operation now in progress"
net.c:343:tds_open_socket() succeeded
...
日志文件显示:

...
net.c:205:Connecting to xxx.xxx.xxx.xxx port 1433 (TDS version 7.0)
net.c:270:tds_open_socket: connect(2) returned "Operation now in progress"
net.c:310:tds_open_socket() succeeded
...
没问题。但如果我将TDSVER更改为7.4:

$TDSVER=7.4tsql-hxxx.xxx.xxx.xxx-uxxxx-p1433-pxxxxxxx

...
iconv.c:384:tds_iconv_open: done
net.c:216:Connecting to xxx.xxx.xxx.xxx port 1433 (TDS version 7.4)
net.c:242:tds_open_socket: connect(2) returned "Operation now in progress"
net.c:343:tds_open_socket() succeeded
...
TDS版本变为4.2

...
net.c:205:Connecting to xxx.xxx.xxx.xxx port 1433 (TDS version 4.2)
net.c:270:tds_open_socket: connect(2) returned "Operation now in progress"
net.c:310:tds_open_socket() succeeded
...
命令
$tsql-C
的输出为:

Compile-time settings (established with the "configure" script)
                            Version: freetds v0.91
             freetds.conf directory: /etc/freetds
     MS db-lib source compatibility: no
        Sybase binary compatibility: yes
                      Thread safety: yes
                      iconv library: yes
                        TDS version: 4.2
                              iODBC: no
                           unixodbc: yes
              SSPI "trusted" logins: no
                           Kerberos: yes
我试图在~/.freetds.conf中配置tds版本,结果是一样的

freetds v1.00.9-匹配 然后我尝试构建从git下载的版本,并安装在我的主文件夹下。看起来版本是匹配的:

$TDSVER=7.4.local/bin/tsql-H xxx.xxx.xxx.xxx-U xxxx-p 1433-p xxxxxxx

...
iconv.c:384:tds_iconv_open: done
net.c:216:Connecting to xxx.xxx.xxx.xxx port 1433 (TDS version 7.4)
net.c:242:tds_open_socket: connect(2) returned "Operation now in progress"
net.c:343:tds_open_socket() succeeded
...
$.local/bin/tsql-C
的输出为:

Compile-time settings (established with the "configure" script)
                            Version: freetds v1.00.9
             freetds.conf directory: /home/bgdata/.local/etc
     MS db-lib source compatibility: no
        Sybase binary compatibility: no
                      Thread safety: yes
                      iconv library: yes
                        TDS version: auto
                              iODBC: no
                           unixodbc: yes
              SSPI "trusted" logins: no
                           Kerberos: no
                            OpenSSL: no
                             GnuTLS: no
                               MARS: no
这是v0.91的错误还是我做错了什么?
谢谢。

FreeTDS 0.91不支持TDS 7.4版。我收到了一个请求,希望能在文档中更清楚地说明这一点:

  • FreeTDS 1.0+最多支持TDS版本
    7.4
  • FreeTDS 0.95最多支持TDS版本
    7.3
  • FreeTDS 0.91最多支持TDS版本
    7.2
另外,永远不要使用
8.0
,除非您使用的是非常旧的FreeTDS版本(此时您不应该使用)。这是一个很长的故事,也包括在文档中,但有很多“指南”在网上推荐它。它会恢复到版本
7.0
,并且可能会产生问题