我尝试使用Python连接SQL Azure的,但得到一个错误:的Python pymssql:Adaptive Server连接失败
File "pymssql.pyx", line 641, in pymssql.connect (pymssql.c:10824)
pymssql.OperationalError: (20002, 'DB-Lib error message 20002, severity 9:\nAdaptive Server connection failed (myserver:1433)\n')
freetds.conf:
[global]
# TDS protocol version
tds version = 7.4
# Whether to write a TDSDUMP file for diagnostic purposes
# (setting this to /tmp is insecure on a multi-user system)
dump file = /tmp/freetds.log
; debug flags = 0xffff
# Command and connection timeouts
; timeout = 10
; connect timeout = 10
# If you get out-of-memory errors, it may mean that your client
# is trying to allocate a huge buffer for a TEXT field.
# Try setting 'text size' to a more reasonable limit
text size = 64512
如果我尝试连接使用TSQL - 连接成功!
我试图重新编译freetds的使用参数:
./configure --enable-msdblib --enable-threadsafe --enable-sybase-compat --with-tdsver=7.4 --with-openssl=/usr/bin
我使用本手册https://msdn.microsoft.com/en-us/library/mt694094(v=sql.1).aspx
谢谢你的回答,但它不能解决我的问题。我从源码pymssql和freetds解决它(在前一篇文章中有选项,并在全局配置中设置tds version = 7.3) – Alximik
@Alximik感谢您的分享。 –