[freetds] Problems with isql

James K. Lowden jklowden at freetds.org
Fri May 9 15:06:21 EDT 2008

Igor wrote:
> I've installed bind to get /bin/host to work fine.. and now FreeTDS is
> trying to connect to correct server:

I just committed a new version of osql to CVS HEAD that handles "server =
a.b.c.d" correctly.  :-)

> [root at bsd ~]# osql -S LekkusLOJA -U $DBUSER -P $DBPASS
>                            DSN:	LekkusLOJA
>              Server's hostname:	bzbraziline
>                        Address:
>                         Driver:	/usr/local/lib/libtdsodbc.so
[so far, so good] 
> Attempting connection as lekkus...
> [S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
> [ISQL]ERROR: Could not SQLConnect

Omph!  OK, how about this:

	$ TDSDUMP=dump osql -S LekkusLOJA -U $DBUSER -P $DBPASS
	$ head -20 dump

It's in there somewhere.  

Did you mention the version of your server?   Your odbc.ini sets
TDS_Version = 8.0.  You need SQL Server 2000 for that.  Try e.g.

	$ TDSVER=4.2 osql -S LekkusLOJA -U $DBUSER -P $DBPASS


More information about the FreeTDS mailing list