Macos 使用FreeTDS连接到MS SQL(Azure)
我在Mac OS X Mavericks上,尝试使用pyodbc连接到Microsoft Azure MS SQL server。为了简单起见,我想使用无DSN的连接,并使用MacPorts安装了FreeTDS和pyodbc(这就是我最终想要使用的) 1。tsql配置Macos 使用FreeTDS连接到MS SQL(Azure),macos,azure,freetds,Macos,Azure,Freetds,我在Mac OS X Mavericks上,尝试使用pyodbc连接到Microsoft Azure MS SQL server。为了简单起见,我想使用无DSN的连接,并使用MacPorts安装了FreeTDS和pyodbc(这就是我最终想要使用的) 1。tsql配置 $ tsql -C Compile-time settings (established with the "configure" script) Version: fre
$ tsql -C
Compile-time settings (established with the "configure" script)
Version: freetds v0.91.103
freetds.conf directory: /opt/local/etc/freetds
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
2。ini(/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/databases/MyODBC/files/odbc.ini)
3。isql测试
$ isql -v MSSQL
[IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified
[ISQL]ERROR: Could not SQLConnect
$ tsql -H xxxxxxxx.database.windows.net -p 1433 -U xxxxxx -P xxxxxx
locale is "en_AU.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
Error 20002 (severity 9):
Adaptive Server connection failed
There was a problem connecting to the server
4。tsql测试
$ isql -v MSSQL
[IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified
[ISQL]ERROR: Could not SQLConnect
$ tsql -H xxxxxxxx.database.windows.net -p 1433 -U xxxxxx -P xxxxxx
locale is "en_AU.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
Error 20002 (severity 9):
Adaptive Server connection failed
There was a problem connecting to the server
我在命令前面使用了TDSVER=8.0
和TDSVER=7.1
,如中所做。使用TDSVER=7.1
我得到一个稍微不同的错误
Error 20017 (severity 9):
Unexpected EOF from the server
Error 20002 (severity 9):
Adaptive Server connection failed
There was a problem connecting to the server
有人能帮我诊断和解决这个问题吗
谢谢 检查此链接。它解决了我和你相似的问题
感谢您的帮助,Jan.已经着手编写了一份新的FreeTDS,它似乎帮助我度过了这个问题。这是使用openssl编译它的关键,因为macports版本不包括它。我必须在制作和安装freetds之前安装openssl(sudo apt get install libssl dev)