Car*_*arl 3 macos azure freetds
我在 Mac OS X Mavericks 上,并尝试使用 pyodbc 连接到 Microsoft Azure MS SQL 服务器。为了简单起见,我想使用无 DSN 的连接,并使用 MacPorts 安装了 FreeTDS 和 pyodbc (因为这就是我最终想要使用的)。
1.tsql配置
$ 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
Run Code Online (Sandbox Code Playgroud)
2.odbc.ini(/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/databases/MyODBC/files/odbc.ini)
[MSSQL]
Description = MyDatabase
Driver = FreeTDS
Servername = xxxxxxx.database.windows.net
UID = username
PWD = password
Port = 1433
TDS_Version = 7.0
Run Code Online (Sandbox Code Playgroud)
3.isql测试
$ isql -v MSSQL
[IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified
[ISQL]ERROR: Could not SQLConnect
Run Code Online (Sandbox Code Playgroud)
4.tsql测试
$ 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
Run Code Online (Sandbox Code Playgroud)
我尝试在命令前面使用TDSVER=8.0和 ,如本文中所做的那样。使用我得到一个略有不同的错误......TDSVER=7.1TDSVER=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
Run Code Online (Sandbox Code Playgroud)
谁能帮我诊断并解决这个问题?
谢谢!
| 归档时间: |
|
| 查看次数: |
4905 次 |
| 最近记录: |