Re: FreeTDS on Debian: connect to MSSQL with ODBC fails

"Peter C. Norton" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
On Thu, Dec 02, 2010 at 09:55:32AM -0500, [email protected] wrote:
> 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.  
> 

James,

Quick note about the script: if you're on a platform with
ksh/bash/zsh, can you have autoconf/configure replace #!/bin/sh with
the more capable shell?  On unix variants that have a true bourne
shell, a lot of things don't work as expected with /bin/sh.

-Peter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.