Skip to Content.
Sympa Menu

freetds - Re: [freetds] osql error

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] osql error
  • Date: Fri, 16 Apr 2010 08:14:41 -0400

On Wed, Apr 14, 2010 at 12:45:38PM -0700, Lee Hughes wrote:
>
> Thanks for the tip. I did as you instructed and installed osql from the
> latest snapshot. This got me much further with troubleshooting, very nice
> tool.

Glad to be of service. I wrote it to help people diagnose ODBC
setup problems. The more systems it works on, the fewer people have to
write to the mailing list just to get started.

> I now have tsql, isql, and OpenOffice successfully connecting to my SQL
> Server. But I cannot connect with osql or ruby-odbc which is my end goal.
>
> osql fails with
>
> "Server" found, not using freetds.conf
> Server is "192.168.1.101"
> looking up hostname for ip address 192.168.1.101
> osql: warning: no DNS hostname found for "192.168.1.101"
>
> I have an entry in /etc/hosts for this IP address

Evidently your host(1) command doesn't return a reverse lookup for names in
/etc/hosts. "host 192.168.1.101" produces no output.

> so I'm not sure why it's failing or how to correct that.

DNS, ideally. ;-)

But this is just a warning for a reason: it shouldn't matter. What else does
osql report?

> When I try to connect from ruby-odbc (ODBC.connect('MY_DSN')) with tracing
> enabled, the following errors appear in the trace file:
>
> DIAG [01000] [FreeTDS][SQL Server]Adaptive Server connection
> failed
>
> DIAG [S1000] [FreeTDS][SQL Server]Unable to connect to data
> source

TDSDUMP should report attempting a connection to 192.168.1.101.

Another trick is to point both TDSDUMP and the ODBC trace to stdout, and
redirect to a file. That lets you see both levels interwoven and sometimes
illuminates what's going on.

HTH.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page