[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freetds
Subject:    Re: [freetds] UnixODBC/FreeTDS
From:       "James K. Lowden" <jklowden () freetds ! org>
Date:       2008-02-12 15:22:58
Message-ID: 20080212102258.7aec4478.jklowden () freetds ! org
[Download RAW message or body]

Zook, Nathan wrote:
> 
> My Setup:  RHEL 5. (unixODBC preinstalled, although compiling from 
> scratch did not help) 
> freeTDS 0.64 d/led & installed. 
> 
> /etc/odbc.ini: 
> [EIDDEVSQL] 
> Driver          = FreeTDS 
> Description     = ODBC via FreeTDS 
> Trace           = Yes 
> TraceFile       = /tmp/odbc_tr 
> Server          = 10.236.9.88 
> Host            = 10.236.9.88 
> Database        = CapacityPlannerDBO 
> Port            = 1433 

http://www.freetds.org/userguide/odbcconnattr.htm

I think the connection fails because you're using the wrong TDS version.  

The 'Server' attribute in odbc.ini tells the driver to connect to that
host.  The freetds.conf file is ignored, the 'tds version' and 'client
charset' properties not read. Instead, client charset is taken from the
locale, and the TDS version used is the compiled-in default.  

"tsql -C" will show the compiled-in default TDS version; it's probably
5.0, which Microsoft servers don't use.  

TIMTOWTDI, as the Perl guys say.  You could:

1.  Export a TDSVER environment variable. 
2.  Use Servername = EIDDEVSQL instead.  
3.  Use TDS_Version = 8.0 in odbc.ini

Any will work.  I recommend the second because it picks up your charset,
too.  

Have another look at the Table 4-1 in the UG.  Many people don't realize
that the *form* of the file is defined by the ODBC standard, but the
attribute names are driver-dependent.  In your file, there's a 'host'
attribute that FreeTDS doesn't define.  It's just taking up space in your
file and your mind.  

HTH.  

--jkl

_______________________________________________
FreeTDS mailing list
FreeTDS@lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic