freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] RES: Adaptive Server connection failed (Php + freetds)
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] RES: Adaptive Server connection failed (Php + freetds)
- Date: Fri, 20 Jun 2008 11:12:36 -0400
Frederick William Borges Pohl wrote:
> If I change the tds version parameter to 7.0 on the freetds.conf and run
> tsql, I get the same error as before:
>
> ./tsql -S <ip_name> -U <user_name>
>
> Msg 20009, Level 9, State -1, Server OpenClient, Line -1
> Unable to connect: Adaptive Server is unavailable or does not exist
> There was a problem connecting to the server
>
> Since I'm not using the -H parameter, tsql should read the freetds.conf
> file which I already specified the tds version to 7.0
Oh, so close!
When you use "tsql -S xyz", you're directing FreeTDS to search
freetds.conf for "xyz". Literally, all it does is scan the file for a
section that looks like [xyz]. It doesn't interpret the string in any
way.
So, when you say "tsql -S "192.168.1.5", FreeTDS looks for a section in
freetds.conf headed by [192.168.1.5].
I'm guessing you have no such section in your file. If that's the case,
FreeTDS will do what it always does when no section is found: it begins
trying to interpret the string. Eventually it succeeds, because you
provied a valid IP address. But it of course falls back on its
compiled-in default for the TDS version. In your case, that's 5.0, and it
fails to connect to the Microsoft server.
Simple, right? :-/ I actually think all the guessing and interpretation
is too clever by half. It confuses people and serves very little purpose,
especially in a properly configured system.
HTH.
--jkl
-
[freetds] Adaptive Server connection failed (Php + freetds),
Frederick William Borges Pohl, 06/19/2008
-
Re: [freetds] Adaptive Server connection failed (Php + freetds),
James K. Lowden, 06/19/2008
-
[freetds] RES: Adaptive Server connection failed (Php + freetds),
Frederick William Borges Pohl, 06/20/2008
- Re: [freetds] RES: Adaptive Server connection failed (Php + freetds), James K. Lowden, 06/20/2008
-
[freetds] RES: Adaptive Server connection failed (Php + freetds),
Frederick William Borges Pohl, 06/20/2008
-
Re: [freetds] Adaptive Server connection failed (Php + freetds),
James K. Lowden, 06/19/2008
Archive powered by MHonArc 2.6.24.