[freetds] Attempting to connect to MS SQL

Frediano Ziglio freddyz77 at tin.it
Wed Feb 23 01:16:53 EST 2005


Il giorno mar, 22-02-2005 alle 18:41 -0500, Jamie Lawrence ha scritto:
> Hi folks, 
> 
> I've tried searching the archives, so far to no avail.
> 
> I'm attempting to connect to a SQL Server 2K machine via FreeTDS, for an
> Apache/mod_perl/DBD::ODBC app from a Debian/Stable machine.
> 
> My first attempt was with the .deb for FreeTDS, which is quite old:
> 
> $Id: tds.h.in,v 1.9 2001/12/03 00:06:14 brianb Exp $
> 
> After setting up, I could only connect through ODBC (isql) if I had a
> $HOME/.odbc.ini config file - it appears to ignore /etc/odbc.ini . So,
> it would work interactively, but a local config isn't an option for my
> application ($ENV{HOME} is not defined).
> 
> So, I built from source (FreeTDS-stable as of last Friday), and have
> been playing with that version since then, and cannot connect at all.
> 
> My odbc.ini uses (currently) this entry (I'm attempting to go the "ODBC
> Only" route described in the online docs):
> 
> [testdsn]
> Description     = Test sql server config
> Driver          = /usr/local/freetds/lib/libtdsodbc.so
> Servername      = xxx.xxx.xxx.xxx
> UID             = xxx
> PWD             = xxx
> Port            = 1433
> Database        = test
> TDS_Version     = 4.2
> 
> (I've tried it with TDS_Version set to 7.0 and 8.0 as well; 4.2 is
> what the really old libraries I tried first were using for a successful
> interactive connect.)
> 

Use 8.0 for mssql2k. You are confusing a mixed configuration with a
odbc-only. See also http://www.freetds.org/userguide/odbcconnattr.htm.
If you use servername you are not using odbc-only, use server instead.

freddy77




More information about the FreeTDS mailing list