[freetds] ODBC-only connection to SQL Server from FreeBSD

Carlo Andreoli vespito at vespito.com
Thu Aug 4 09:05:28 EDT 2005


Hello,
  I don't have root access to my server, so I installed FreeTDS in my home directory. I tried it several times, because I didn't manage to install libtdsodbc.so. Finally I managed to do it, putting --with-iodbc=/usr/local/  .
Now tsql connects fine:

carlo at qs41% ./tsql -H ip.ip.ip.ip -p 1433 -U user -P psw
locale is "C"
locale charset is "US-ASCII"
1>quit
carlo at qs41%


However, sometimes the connection is refused.

Anyway, the point is that iodbc does not connect:

carlo at qs41% /usr/local/bin/iodbc-odbctest "DSN= SCAM; UID=user; P= psw"
iODBC Demonstration program
This program shows an interactive SQL processor
[FreeTDS][SQL Server]Unable to connect to data source, SQLSTATE=08001

Have a nice day.carlo at qs414%

So, it looks like the problem was in the .odbc.ini. Here it is:

[ODBC Data Sources]
SCAM= SQL Server 2000


[SCAM]
Driver          = /usr/home/carlo/freetds/lib/libtdsodbc.so
Description     = SQL SERVER
Server          = ip.ip.ip.ip
Address         = ip.ip.ip.ip
Host            = ip.ip.ip.ip
Port            = 1433
ServerType      = SQL Server 2000
Trace           = yes
TDS_Version     = 8.0
UID             = user
PWD             = psw
Database        = SYSMA4
ReadOnly        = no

[Default]

Driver = /usr/home/carlo/freetds/lib/libtdsodbc.so

Could anybody point me to my error? Thank you in advance for any help. Regards;


Carlo.



More information about the FreeTDS mailing list