odbc keine Verbindung zu MSSQL data source auf Mac OS X Lion

odbc isql konnte keine Verbindung zu Datenquelle:

 $ isql SMS_GTWY username password -v

gibt:

 [S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
 [01000][unixODBC][FreeTDS][SQL Server]Unknown host machine name.
 [ISQL]ERROR: Could not SQLConnect

während tsql ist ok:

 $ tsql -S SERVER001 -U username -P password

gibt:

 locale is "C/UTF-8/C/C/C/C"
 locale charset is "UTF-8"
 using default charset "UTF8"
 1> 

$ cat ~/.freetds.conf:

 [SERVER001]
   host = 192.168.8.101
   port = 1433
   tds version = 8.0
   client charset = UTF8

$ cat ~/.odbc.ini:

  [SMS_GTWY]
  Description = SERVER001 Server
  Driver      = freetds
  Database    = SMS_GTWY
  ServerName  = SERVER001
  TDS_Version = 7.1

$ cat ~/.odbcinst.ini:

  [freetds]
  Description = MS SQL database access with FreeTDS
  Driver      = /usr/local/lib/libtdsodbc.so
  Setup       = /usr/local/lib/libtdsodbc.so
  UsageCount  = 1

freetds und unixODBC installieren von homebrew.

Ich habe ein ähnliches setup auf CentOS und odbc-isql auf mssqlserver ist in Ordnung. Gibt es einen wahrnehmbaren Unterschied, ich sehe auch nicht ein libtdsS.so installiert auf OS X.

# cat /etc/odbcinst.ini auf CentOS:

 [freetds]
 Description = MS SQL database access with FreeTDS
 Driver      = /usr/lib/libtdsodbc.so
 Setup       = /usr/lib/libtdsS.so 
 UsageCount  = 1

Ist, dass die Ursache des Problems?

p.s. $ odbcinst -j gibt:

 unixODBC 2.3.1
 DRIVERS............: /usr/local/Cellar/unixodbc/2.3.1/etc/odbcinst.ini
 SYSTEM DATA SOURCES: /usr/local/Cellar/unixodbc/2.3.1/etc/odbc.ini
 FILE DATA SOURCES..: /usr/local/Cellar/unixodbc/2.3.1/etc/ODBCDataSources
 USER DATA SOURCES..: /Users/horace/.odbc.ini
 SQLULEN Size.......: 8
 SQLLEN Size........: 8
 SQLSETPOSIROW Size.: 8

$ odbcinst -q -d gibt:

 [freetds]

$ odbcinst -q -s gibt:

 [SMS_GTWY]
InformationsquelleAutor ohho | 2012-12-14
Schreibe einen Kommentar