gpt4 book ai didi

FreeTDS 显示来自服务器的意外 EOF

转载 作者:行者123 更新时间:2023-12-02 08:54:48 25 4
gpt4 key购买 nike

我正在使用安装在 OS X Snow Leopard 上的 FreeTDS 0.82 连接到 SQL Server 2005 数据库。

当我尝试连接 tsql 时,我得到了这个:

tsql -S abc -U uuu
locale is "en_US.UTF-8"
locale charset is "UTF-8"
Password:
Msg 20017, Level 9, State -1, Server OpenClient, Line -1
Unexpected EOF from the server
Msg 20002, Level 9, State -1, Server OpenClient, Line -1
Adaptive Server connection failed
There was a problem connecting to the serve

freetds.conf:

[abc]
Host = host.host.domain
port = 1433
tds version = 8.0

日志文件:

13:02:23.904572 97429 (log.c:190):Starting log file for FreeTDS 0.82 on 2011-04-20 13:02:23 with debug flags 0xffff.
13:02:23.904657 97429 (iconv.c:197):names for ISO-8859-1: ISO-8859-1
13:02:23.904669 97429 (iconv.c:197):names for UTF-8: UTF-8
13:02:23.904678 97429 (iconv.c:197):names for UCS-2LE: UCS-2LE
13:02:23.904686 97429 (iconv.c:197):names for UCS-2BE: UCS-2BE
13:02:23.904694 97429 (iconv.c:363):iconv to convert client-side data to the "UTF-8" character set
13:02:23.904715 97429 (iconv.c:516):tds_iconv_info_init: converting "UTF-8"->"UCS-2LE"
13:02:23.904729 97429 (iconv.c:516):tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
13:02:23.904744 97429 (net.c:210):Connecting to 174.46.169.40 port 1433 (TDS version 8.0)
13:02:23.904847 97429 (net.c:264):tds_open_socket: connect(2) returned "Operation now in progress"
13:02:23.966370 97429 (net.c:303):tds_open_socket() succeeded
13:02:23.966422 97429 (util.c:162):Changed query state from DEAD to IDLE
13:02:23.966433 97429 (login.c:735):quietly sending TDS 7+ login packet
13:02:23.966481 97429 (token.c:312):tds_process_login_tokens()
13:02:24.036207 97429 (util.c:334):tdserror(0x1001001d0, 0x100100840, 20017, 0)
13:02:24.036286 97429 (util.c:368):tdserror: client library returned TDS_INT_CANCEL(2)
13:02:24.036300 97429 (util.c:389):tdserror: returning TDS_INT_CANCEL(2)
13:02:24.036327 97429 (util.c:162):Changed query state from IDLE to DEAD
13:02:24.036338 97429 (token.c:316):looking for login token, got 0()
13:02:24.036478 97429 (token.c:108):tds_process_default_tokens() marker is 0()
13:02:24.036494 97429 (token.c:111):leaving tds_process_default_tokens() connection dead
13:02:24.036504 97429 (util.c:334):tdserror(0x1001001d0, 0x100100840, 20002, 0)
13:02:24.036614 97429 (util.c:368):tdserror: client library returned TDS_INT_CANCEL(2)
13:02:24.036626 97429 (util.c:389):tdserror: returning TDS_INT_CANCEL(2)
13:02:24.036639 97429 (mem.c:563):tds_free_all_results()

我试过 7.2、7 等版本,它们都显示相同的内容。

最佳答案

尝试

tds version = 7.0

或者设置如下环境变量:

TDSVER="7.0"

还要确保端口正确,它可能因编译时设置而异。您也可以在环境中设置:

TDSPORT="1433"

关于FreeTDS 显示来自服务器的意外 EOF,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5734018/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com