freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] UnixODBC/FreeTDS
- Date: Tue, 12 Feb 2008 10:22:58 -0500
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] UnixODBC/FreeTDS,
Zook, Nathan, 02/12/2008
- Re: [freetds] UnixODBC/FreeTDS, James K. Lowden, 02/12/2008
Archive powered by MHonArc 2.6.24.