Skip to Content.
Sympa Menu

freetds - Re: [freetds] unixODBC connection not working while tsql does

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] unixODBC connection not working while tsql does
  • Date: Wed, 5 Jan 2011 22:30:03 -0500

Hi Roger,

> I have
> always used Windows and I am trying to start using Linux. I have made
> decent progress and I would love to like Linux, but Linux takes up a
> large amount of times sometimes just to get very easy stuff working.

I sympathize. In the beginning it's very confusing.

One nice thing about Linux and free software generally is that they don't
change gratuitously. They don't have any incentive to encourage upgrades,
no reason to tout useless changes as the next Big Thing. The benefit to
you: what you learn tends to remain useful.

Another thing that takes some getting used to, coming from Windows, is
that the documentation (and error messages!) have every reason to do their
best to describe the software (or problem) well enough to enable the user
to understand what to do. There's no assumption that there's an IT staff
to deal with it, no support contract to sell, and no trade secret to
protect. Sometimes, though, that places a burden of a different kind on
the user: in order to be clear, the language used tends to use more
technical. As you become more knowledgeable the messages become clearer.
Well, sometimes, usually, I'd say. Not always, for sure!

http://www.dadhacker.com/blog/?p=555

Error messages matter.

> I think my problem was that osql doesn't know where my .ini files are
> located. According to most threads they should be in /usr/local/freetds
> and /usr/local/odbc, but mine in are /etc/. My install is different
> somehow and I don't know why. I even used the
> --prefix=/usr/local/freetds option in the ./configure step.

Did you try "./configure --help"? It's a perfect example of what I'm
talking about: easy if you know how:

$ ./configure --help | sed -ne'/\-\-prefix=PRE/,/local/p; /sysconf/p;'
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]

Here PREFIX is whatever you put after '--prefix=', in your case
/usr/local/freetds. The default is /usr/local. The ini files would be
expected to be in PREFIX/etc (default /usr/local/etc, in your case
/usr/local/freetds/etc). To override that, you'd use the --sysconfdir
option (*but* that's not a very common choice and is likely to confuse
anyone coming after you, including you next year).

To understand the canonical meanings the the directory structure, I
recommend "man hier" and the Filesystem Hierarchy Standard. The purpose
of each directory has been carefully thrashed out over the years and is
worth taking the time to digest. For a traditional description, cf.
http://netbsd.gw.com/cgi-bin/man-cgi?hier++NetBSD-current.

It works so well I have C:\usr\local on my Windows boxes.

If I wanted to keep my configuration files in /etc, I would let configure
follow its default and follow PREFIX, and use symbolic links in /etc that
point to the real files in PREFIX/etc.

HTH.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page