Skip to Content.
Sympa Menu

freetds - Re: [freetds] Problems with isql

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: Igor Korot <ikorot AT earthlink.net>, FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Problems with isql
  • Date: Sat, 10 May 2008 13:38:10 -0400

Igor Korot wrote:
> >login.c:226:IP address pointer is empty
> >login.c:228:Server SYBASE not found!
> ^^^^^^
>
> Apparently you are connecting to the Sybase server and not MS one.

"Server SYBASE not found" is a little misleading.

The application passes to the library the name of a server it wants to
connect to. The library -- libtds, at the bottom -- tries to look up that
name in several places e.g. /usr/local/freetds.conf, $HOME/.freetds.conf,
etc. If it can't find the name in any configuration file, it tries DNS to
see if the name is a hostname. If that fails, it tries to convert the
name to an IP address. If that fails, it tries DNS again, asking if the
name "SYBASE" has a valid ip address. If *that* fails, the above message
appears.

Personally, I think the above behavior is too clever by half. I can't
believe anyone relies on it, especially the last-ditch SYBASE effort. But
it's not important to "fix", if that's the word. The error message
"Unable to connect to data source" is clear enough, and TDSDUMPCONFIG
yields good diagnostics.

More important is that the TDSDUMP log is opened in tds_connect(), after
the configuration files have been read. Because of that, errors in the
configuration don't appear in the TDSDUMP log, and the original input --
the name to be looked up -- is lost. One of these days, we should open
the log when the library is initialized instead. Patches always welcome!


--jkl




Archive powered by MHonArc 2.6.24.

Top of Page