FreeTDS problem connecting to SQL Server on Mac (Unexpected EOF from the server)
I think I got it, it's the TDS configured version, I had 5.0, which caused the error
Try running tsql -C
to check what version are you using, and then you can invoke tsql
overriding the version with:
TDSVER=7.0 tsql -H hostname -p port -U domain\\\username -P password
and it worked!
To make this permenant I found I need to edit the freetds.conf
file and set it globally in there
vim /usr/local/freetds/etc/freetds.conf
tds version = 8.0
running tsql -C
still showed that the version was 5.0 but connecting now worked every time.
TDS version need to match the correct tds protocol to connect to your db server, see below -
http://www.freetds.org/userguide/choosingtdsprotocol.htm
Choosing a TDS protocol version
***DB SERVER | TDS VERSION ***
Microsoft SQL Server 6.x = 4.2
Sybase System 10 and above = 5.0
Sybase System SQL Anywhere = 5.0
Microsoft SQL Server 7.0 = 7.0
Microsoft SQL Server 2000 = 7.1
Microsoft SQL Server 2005 = 7.2
Microsoft SQL Server 2008 = 7.2