小编Moo*_*bat的帖子

pymssql和Adaptive Server连接失败

当我尝试通过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)

python ubuntu azure freetds pymssql

10
推荐指数
1
解决办法
2万
查看次数

标签 统计

azure ×1

freetds ×1

pymssql ×1

python ×1

ubuntu ×1