gpt4 book ai didi

azure-sql-database - 尝试从tsql连接到sql-azure时从服务器读取失败

转载 作者:行者123 更新时间:2023-12-04 13:17:09 26 4
gpt4 key购买 nike

我正在尝试从Ubuntu 12.04连接到SQL-Azure。

我已经用openssl和libiconf编译了freeTds-0.91

tsql -H XXXXXXXX.database.windows.net -U Username -D DatabaseName -p 1433 -P Password

我尝试使用上面的语句进行连接,但出现此错误:
locale is "en_ZA.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
Default database being set to DatabaseName
Error 20004 (severity 9):
Read from the server failed
OS error 104, "Connection reset by peer"
Error 20002 (severity 9):
Adaptive Server connection failed
There was a problem connecting to the server

我的tsql -C输出:
Compile-time settings (established with the "configure" script)
Version: freetds v0.91
freetds.conf directory: /usr/local/etc
MS db-lib source compatibility: no
Sybase binary compatibility: no
Thread safety: yes
iconv library: yes
TDS version: 5.0
iODBC: no
unixodbc: no
SSPI "trusted" logins: no
Kerberos: no

我似乎找不到导致问题的原因以及如何解决此问题的任何信息。

任何帮助将不胜感激。

最佳答案

该错误是由于使用了错误版本的TDS引起的。

要解决此问题,只需在tsql命令之前指定TDS版本:

TDSVER=8.0 tsql -H XXXXXXXX.database.windows.net -U Username -D DatabaseName -p 1433 -P Password

关于azure-sql-database - 尝试从tsql连接到sql-azure时从服务器读取失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11721403/

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