Using FreeTDS to connect to MSSQL
01 Oct 2015In today’s post, I’ll outline the steps required to connect to a Microsoft Sql Server database from within an Ubuntu Linux environment using FreeTDS and ODBC.
Get the software
Using apt-get, we can satisfy all of the system-level requirements (libraries):
FreeTDS now needs to be defined as a driver in the /etc/odbcinst.ini
file.
Hitting the can
Now that we’ve got a driver up and running, we can use a library like sqlalchemy to run some queries. Before we can do that though, we need to install python’s odbc bindings pyodbc.
We can now start running some queries.