Goal: Connect to MSSQL using FreeTDS / ODBC in Python.
Host: Ubuntu 11.10 x86_64
Install:
sudo apt-get install freetds-dev freetds-bin unixodbc-dev tdsodbc
pip install pyodbc sqlalchemy
In /etc/odbcinst.ini:
[FreeTDS]
Description=FreeTDS Driver
Driver=/usr/lib/odbc/libtdsodbc.so
Setup=/usr/lib/odbc/libtdsS.so
I was able to fix it. I will edit and post once I am back on computer.
The issues were:
(1) use of “DNS” rather than “Driver” as well as it should have said “FreeTDS”. I was able to iterate through the drivers installed on the container from Python to locate the correct one. I image this name is set somewhere in the ini file.
(2) Linux not liking the special characters in the temporary password I had setup to hit the SQL server
Greatly appreciate the help. The docs above are also very helpful in general.
Thanks!