Do you have all the necessary software? This is what you need for Ubuntu 12.04:
sudo apt-get install php5-odbc php5-sybase tdsodbc
Have you configured these files on your Linux server? (They are taken from Ubuntu 12.04 server)
file /etc/odbc.ini
/etc/odbcinst.ini
/etc/freetds/freetds.conf
I read several reports of the tds version causing the problems. It seems that 8.0 words is best, but I also saw people say that they work with 7.5 and 7.0.
Then check your connection:
isql mssql username password
Depending on your environment, your username should be in the format: domain \ username
After issuing the command, you should see something like:
+---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL>
And here is what I think your join command should look like (NOTE: I don't know Python):
cnxn = pyodbc.connect('DRIVER=freetds;SERVER=FOOBAR;PORT=1433;DATABASE=T2;UID=FOO;PWD=bar;TDS_Version=8.0;')
source share