首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >FreeTDS不使用配置的tds版本

FreeTDS不使用配置的tds版本
EN

Stack Overflow用户
提问于 2016-07-13 13:42:14
回答 1查看 2.5K关注 0票数 4

freetds v0.91 - tds版本不匹配

我想在Ubuntu14.04上用FreeBSD连接到。FreeTDS是使用apt安装的。我使用以下命令尝试了不同的tds版本:

$ TDSVER=7.0 tsql -H xxx.xxx.xxx.xxx -U xxxx -p 1433 -P xxxxxxx

日志文件显示:

代码语言:javascript
复制
...
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.4 tsql -H xxx.xxx.xxx.xxx -U xxxx -p 1433 -P xxxxxxx

TDS版本变成4.2?

代码语言:javascript
复制
...
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的输出是:

代码语言:javascript
复制
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

代码语言:javascript
复制
...
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的输出是:

代码语言:javascript
复制
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

是0.91的错误还是我做错了什么?谢谢。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-07-13 21:03:01

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

https://github.com/FreeTDS/freetds/pull/71/files

  • FreeTDS 1.0+支持TDS版本7.4
  • FreeTDS 0.95支持TDS版本7.3
  • FreeTDS 0.91支持TDS版本7.2

此外,从不使用8.0,除非您使用的是非常旧的FreeTDS版本(此时您不应该使用该版本)。这是一个很长的故事也涵盖在文档,但有很多“指南”围绕网络推荐它。它会恢复到7.0版本,并会产生问题。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38353440

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档