本文介绍了尝试从tsql连接到sql-azure时从服务器读取失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试从Ubuntu 12.04连接到SQL-Azure.
I'm trying to connect to SQL-Azure from Ubuntu 12.04.
我已经用openssl和libiconf编译了freeTds-0.91
I've compiled freeTds-0.91 with openssl and libiconf
tsql -H XXXXXXXX.database.windows.net -U Username -D DatabaseName -p 1433 -P Password
我尝试使用上面的语句进行连接,但出现此错误:
I try connect using the above statement and I get this error:
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输出:
My tsql -C output:
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
我似乎找不到导致问题的原因以及如何解决此问题的任何信息.
I can't seem to find any information on what is causing and how to resolve this issue.
任何帮助都会得到很大的帮助.
Any help will be much appreaciated.
推荐答案
该错误是由于使用了错误的TDS版本引起的.
The error is caused by the use of the wrong version of TDS.
要解决此问题,只需在tsql命令之前指定TDS版本:
To resolve just specify the TDS version before the tsql command:
TDSVER=8.0 tsql -H XXXXXXXX.database.windows.net -U Username -D DatabaseName -p 1433 -P Password
这篇关于尝试从tsql连接到sql-azure时从服务器读取失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!