Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kevin3747118/54cbeb01c183657772356d4d015dbb99 to your computer and use it in GitHub Desktop.
Save kevin3747118/54cbeb01c183657772356d4d015dbb99 to your computer and use it in GitHub Desktop.

FreeTDS and ODBC Configuration on Ubuntu 16 LTS

Installation Command on Ubuntu

$ sudo apt-get install unixodbc unixodbc-dev freetds-dev freetds-bin tdsodbc

Configuration file locations:

  • /etc/freetds/freetds.conf
[azure]
        host = Domain.database.windows.net
        port = 1433
        tds version = 8.0
        database = <Database_Name>
  • /etc/odbc.ini
[azure]
Driver = FreeTDS
Server = Domain.database.windows.net
Port = 1433
Database = <database_name>
Driver=/usr/local/lib/libtdsodbc.so
UsageCount = 1

[Default]
Driver=/usr/local/lib/libtdsodbc.so
  • /etc/odbcinst.ini
[ODBC]
Trace = No
TraceFile = /tmp/odbc.log

[FreeTDS]
Description = FreeTDS
Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so
UsageCount = 1

Test Free TDS

$ tsql -S azure -U user_name@domain

After entering the password, you should get the magical 1> prompt rather than the infuriating timer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment