Pyodbc on Mac connection issues

徘徊边缘 提交于 2020-01-17 08:31:32

问题


I have FreeTDS, unixODBC in my python 3.6.1 installation I'm trying to get pyodbc connected to my sql server (local VM) . I have tried the following to test configuration of freetds

tsql -S servername -U pydata

I get the following message

Error 20012 (severity 2): Server name not found in configuration files. locale is "en_US.UTF-8" locale charset is "UTF-8" using default charset "UTF-8" Error 20013 (severity 2): Unknown host machine name. There was a problem connecting to the server

however if I use tsql -S 10.0.0.123 -U pydata -P password i connect just fine with no issues. I have triple checked the Freetds.conf file as well as the odbc.ini and odbcinst.ini files.

Anyone have any ideas why my entry for the server is not working?

来源:https://stackoverflow.com/questions/44167524/pyodbc-on-mac-connection-issues

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!