Connecting to Microsoft Azure from Linux (Mac)

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

Response
Compile-time settings (established with the “configure” script)
Version: freetds v0.92.dev.20120312
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-0.92.dev.20120312.

FreeTDS connection string for Azure SQL Server 2012

Type the following on terminal:

TDSVER=7.1 tsql -H database1.database.windows.net -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:

Password:
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
1>

Useful links

http://www.freetds.org/userguide/

Interesting Infoware Studios Bookmarks

0
  Related Posts