[S1000] [unixODBC] [FreeTDS] [SQL Server] Unable to connect to data source

I know that this question is asked many times, and I tried everything, but nothing worked. I am trying to connect to the MSSQL database on another 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 the 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 the following command, it generates numbers that increase

  tsql -S mssql -U username -P password

But when I started

  isql -v mssql username password

After nearly 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 Connection to port 54.214.30.231 1433 (TDS version 4.2)

TDS 4.2, , tsql -C, 7.3 conf. ? , ? , -, , , ?

+11
1

, i odbc. odbc.in odbc.ini

isql man :

isql, iusql - SQL unixODBC.

isql DSN [USER [PASSWORD]] [options] Description

isql - , SQL . , , HTML.

iusql - Unicode.

DSN

  • , . /etc/odbc.ini $ HOME/.odbc.ini , .

  • / , .

  • .

/etc/odbcinst.in. /etc/odbcinst.ini

, , , , OP.

: [IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified [ISQL]ERROR: Could not SQLConnect.

Server=ip_address odbc.ini ( ). , [mssql] ServerDSN! , TDS, TDS_Version = 7.3? Driver /etc/odbcinst.ini. - Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so Driver=/usr/local/lib/libtdsodbc.so ?

( , ):

[mssql]
Description = "My MSSQL DB for data science"
Driver = FreeTDS
ServerName = mssql
Server = <ip_address>
Port = 1433
Database = My Database //database has space
UsageCount = 1
TDS_Version = 7.3
instance = <my_mssql_instance>
+2

All Articles