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: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Problems with isql
  • Date: Sat, 10 May 2008 13:16:18 -0400

Hi Igor,

> I'm trying with CVS version and now the IP address is accepted fine..
> but doesn't connect :-(

There are two things wrong here, one of which I can explain.

> Compile-time settings (established with the "configure" script)
> Version: freetds v0.83.dev.20080509
> freetds.conf directory: /usr/local/etc
> MS db-lib source compatibility: no
> Sybase binary compatibility: no
> Thread safety: yes
> iconv library: no
> TDS version: 5.0

TDS 5.0 won't work with a Microsoft server. When you use tsql without
freetds.conf -- using the -H & -p options -- you have to set your TDS
version via the TDSVER environment variable:

$ TDSVER=7.0 tsql -H 192.168.1.21 -U $DBUSER -P $DBPASS

would work if your server used the default port. It doesn't, so you need:

$ TDSVER=7.0 tsql -H 192.168.1.21 -p 1401 \
-U $DBUSER -P $DBPASS

> [root@bsd ~/free/freetds/src/apps]# TDSDUMP=dump ./osql -S LekkusLOJA
> -U $DBUSER -P $DBPASS
...
> found this section:
> [LekkusLOJA]
> Description = Lekkus LOJA
> Driver = FreeTDS
> Trace = No
> Server = 192.168.1.21
> Port = 1401
> TDS_version = 8.0
> Database = Lekkus
...
> DSN: LekkusLOJA
> Driver: /usr/local/lib/libtdsodbc.so
> Server's hostname: bzbraziline
> Address: 192.168.1.21

Looks fine. Unfortunately, osql is not testing something it should. :-(

You didn't test with CVS HEAD, btw. See the log:

> util.c:292:Starting log file for FreeTDS 0.65.dev.20061107

The bad news is in the TDSDUMP log:

> login.c:226:IP address pointer is empty
> login.c:228:Server SYBASE not found!

Bah! Usually I can spot these things. Somehow, even though the
configuration looks fine to me, the ODBC driver is not providing a proper
ip address to connect to.

Let's pull out all the stops. TDSDUMPCONFIG should tell us where we're
going wrong:

$ TDSDUMPCONFIG=dump osql -S LekkusLOJA -U $DBUSER -P $DBPASS

and post the contents of dump, please.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page