Connecting to Microsoft Azure from Linux (Mac)

Posted by:

After wasting a couple of hours to fine tune the right settings for connecting to Microsoft Azure from Linux we managed to find the settings that works with MS SQL Server 2012, so I would like to share that with those of you that stumble across this blog and hopefully I can contribute to making your journey less painful as Microsoft Azure is really cool.

So I assume that you have FreeTDS installed.

Check FreeTDS version

You can check your FreeTDS version on terminal like this:

tsql -C

Compile-time settings (established with the “configure” script)
Version: freetds
freetds.conf directory: /usr/local/etc
MS db-lib source compatibility: no
Sybase binary compatibility: no
Thread safety: yes
iconv library: yes
TDS version: 5.0
iODBC: yes
unixodbc: no
SSPI “trusted” logins: no
Kerberos: no

Although this indicates that the TDS version is 5.0, I actually installed source version

FreeTDS connection string for Azure SQL Server 2012

Type the following on terminal:

TDSVER=7.1 tsql -H -D DEFAULT_DB -p 1433 -U user1

type in the password and once authenticated you will see the following that is an indication of success:

locale is “C/UTF-8/C/C/C/C”
locale charset is “UTF-8”
using default charset “UTF-8”
Setting DEFAULT_DB as default database in login packet

Useful links

Interesting Infoware Studios Bookmarks


About the Author:

  Related Posts