I know this question is asked many times and I have tried all but nothing worked. I am trying to connect to a MSSQL database on a different server from Ubuntu 14.04.
Content from /etc/odbcinst.in
[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
fileusage=1
dontdlclose=1
Content from /etc/odbc.in
[mssql]
Driver = FreeTDS
ServerName = mssql
Port = 1433
Database = My Database //database has space
Driver=/usr/local/lib/libtdsodbc.so
UsageCount = 1
TDS_Version = 7.3
instance = SQLEXPRESS
[Default]
Driver=/usr/local/lib/libtdsodbc.so
And mssql section in /etc/freetds/freetds.conf
[mssql]
host = server ip
port = 1433
database = My Databas
instance = SQLEXPRESS
tds version = 7.3
client charset = UTF-8
When I run following command it generates numbers which increases
tsql -S mssql -U username -P password
But when I run
isql -v mssql username password
After almost 30 sections it returns
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[08S01][unixODBC][FreeTDS][SQL Server]Unable to connect: Adaptive Server is unavailable or does not exist
[ISQL]ERROR: Could not SQLConnect
net.c:205:FAILED Connecting to 54.214.30.231 port 1433 (TDS version 4.2)
The error is showing TDS version 4.2 that is installed in my machine when I check it with tsql -C but I specified 7.3 in conf files. Is it the reason? If so how can I upgrade the version? If it isn't the reason then Can some one please let me know what I am doing wrong?
7.3
might not be supported, try7.2
? But I don't think that's the problem. Normally when the numbers are increasing as you describe, it means it can't connect. Can you try using telnet to connect to your SQL Server instance? Try the commandtelnet sqlserver.domain.com 1433
with your server name and port and see if it connects, or just hangs trying to connect. - FlipperPAcouldn't not open connection, connection failed
But I can create connection using SQL database client using same credentials. So what is wrong? - Awais Qarni