我已经使用带有8.0协议的FreeTDS一段时间来连接到MSSQL数据库,事情已经发挥得很好.但是,最近,事情开始变得不那么好了.我会遗漏细节.
所以我们决定我们需要了解更多,我对以下内容感到有些困惑:
是.Microsoft服务器通常不接受TDS 5.0连接.使用协议版本4.2,7.0或8.0之一.有关 详细信息,请参阅用户指南
[No mention of 8.0 anywhere on the page.]
Run Code Online (Sandbox Code Playgroud)
那么,什么是TDS协议版本8.0以及我为什么要使用它?
当我尝试通过python中的Pymssql连接到Azure数据库时,我面临以下错误:
pymssql.OperationalError: (20002, 'DB-Lib error message 20002, severity 9:\nAdaptive Server connection failed (iprice-bi.database.windows.net:1433)\n')
Run Code Online (Sandbox Code Playgroud)
我通过tsql命令连接到数据库:
tsql -H server -p 1433 -U username -P password
locale is "en_US.UTF-8"
Run Code Online (Sandbox Code Playgroud)
locale charset是"UTF-8",使用默认字符集"UTF-8"1> SELECT @@ version 2> GO
Microsoft SQL Azure (RTM) - 12.0.2000.8
Mar 1 2016 22:36:40
Copyright (c) Microsoft Corporation
(1 row affected)
Run Code Online (Sandbox Code Playgroud)
我检查了freetds.conf以确保我使用的是正确的版本.
[global]
# TDS protocol version
tds version = 7.0
dump file = /tmp/freetds.log
dump file append = yes
Run Code Online (Sandbox Code Playgroud)
日志文件的结果也没有给出任何线索.
log.c:167:Starting log file for FreeTDS 0.95.87
on 2016-03-25 16:50:51 with …Run Code Online (Sandbox Code Playgroud) 我正在尝试从Ubuntu 12.04连接到SQL-Azure.
我用openssl和libiconf编译了freeTds-0.91
tsql -H XXXXXXXX.database.windows.net -U Username -D DatabaseName -p 1433 -P Password
Run Code Online (Sandbox Code Playgroud)
我尝试使用上面的语句连接,我收到此错误:
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
Run Code Online (Sandbox Code Playgroud)
我的tsql -C输出:
Compile-time settings (established with the "configure" script)
Version: freetds v0.91
freetds.conf directory: /usr/local/etc
MS …Run Code Online (Sandbox Code Playgroud)