Я пытаюсь создать соединение с freetds + unixodbc в Linux для базы данных в Windows, я настроил /etc/freetds/freetds.conf, /etc/odbc.ini и/etc /odbcinst.ini:Как настроить freetds и unixodbc на Linux Ubuntu
freetds.conf:
A typical Microsoft server
[wsus]
host = my-ip-sql-server
port = 1433
tds version = 4.2
odbc.ini
[wsus]
Driver = FreeTDS
Trace = No
ServerName = wsus
Database= Asegurador
в
О.Д. bcinst.ini
[wsus]
Description = tdsodbc
Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so
FileUsage = 1
CPTimeout = 5
Командный выход = TSQL -C:
Compile-time settings (established with the "configure" script)
Version: freetds v0.91
freetds.conf directory: /etc/freetds
MS db-lib source compatibility: no
Sybase binary compatibility: yes
Thread safety: yes
iconv library: yes
TDS version: 4.2
iODBC: no
unixodbc: yes
SSPI "trusted" logins: no
Kerberos: yes
Когда я бегу TSQL соединение успешным:
$ tsql -S wsus -U username -P password
locale is "es_ES.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
1> select top 1 FechaFactura, Vendedor, ClaseDoc from [Aseguradoras].[dbo].[mknDetalleAseguradoras]
2> go
FechaFactura Vendedor ClaseDoc
2014-07-12 xx 2
Но когда я бегу ISQL:
$ isql -v wsus username Password [IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified [ISQL]ERROR: Could not SQLConnect
Заранее спасибо.
Просто примечание, но версия TDS 4.2 крайне маловероятна, так как она соответствует SQL Server 6.0. См. Эту полезную документацию: http://www.freetds.org/userguide/choosingtdsprotocol.htm – IMSoP