Skip to Content.
Sympa Menu

freetds - Re: [freetds] FreeTDS on Debian: connect to MSSQL with ODBC fails

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: jklowden AT schemamania.org
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] FreeTDS on Debian: connect to MSSQL with ODBC fails
  • Date: Thu, 2 Dec 2010 09:55:32 -0500

On Thu, Dec 02, 2010 at 09:12:51AM +0100, Boniforti Flavio wrote:
> > The current version of osql does indeed parse ldd output if
> > strings(1) fails to find any candidates. I'm interested in
> > improving the script to deal with any environments to which I
> > don't have access. It's a sort of on-going experiment in
> > whether or not a simple bourne shell script can identify all
> > odbc configuration problems.

Hello Flavio,

> how would I be helped in my issue, having troubles connecting to MSSQL
> from Debian Sid?

I have found over the years that ODBC problems are tedious and repetitive.
It always works, but it's easy to make a small mistake, and any small
mistake results in pretty much the same "cannot connect" error. I wrote
the osql script to automate the advice normally provided, to check each
part of the configuration and report when something looks wrong.

It's trickier than it might look to do correctly. For example, isql will
not report where it looks for its odbc.ini. So the osql script tries to
infer that by searching the binary and parsing ldd(1) output. And then
there are the usual portability issues, such as the versions of sed(1)
and awk(1), and the options they accept. But after 11 tries we seem to
be making some progress!

If you haven't already, make sure you're using the latest revision of
the osql script, currently 1.11. You can extract it from the nightly
tarball.

Run it. If it doesn't work -- i.e. if it doesn't start isql and fails to
give you a good diagnostic -- run it verbosely:

sh -x osql ...

Post the output here, and let's see.

HTH.

--jkl





Archive powered by MHonArc 2.6.24.

Top of Page