pyodbc

“Login timeout expired” error when accessing MS SQL db via sqlalchemy and pyodbc

末鹿安然 提交于 2020-08-27 03:59:19
问题 So I have some trouble getting sqlalchemy and pyodbc working with a remote MS SQL Server. Local sqlcmd worked properly but not when I try to read the db via python code. Any help would be appreciated. Environment: Centos 7 SQLCmd version: Version 17.1.0000.1 Linux MS SQL Server 6.01.7601.17514 Python 2.7 The following sqlcmd worked properly sqlcmd -S {Host},{Port} -U {USER} -P {PWD} -Q "use {Database};" Attempts to work with sqlalchemy or pyodbc directly didn't work. Error: pyodbc