Skip to Content.
Sympa Menu

freetds - Re: [freetds] SQL Server 2005 64-bit Connection oddities

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] SQL Server 2005 64-bit Connection oddities
  • Date: Tue, 22 Sep 2009 11:04:01 +0200

2009/9/16 Hoellig, Peter <Peter.Hoellig AT trane.com>:
> Hello, I've recently set up a MS SQL Server 2005 64bit (Win Server 2003
> 64bit) database and I'm trying to establish a connection to it using
> FreeTDS (Fedora box) so that a Java app can pull information out of it.
> I've had FreeTDS running properly with a SQL Server 2000 for quite some
> time now and that still works fine. I've tried both ODBC-only and
> ODBC-combined methods of connecting and they receive different results.
>
>
>
> If I set up ODBC-combined then I'm able to tsql connect, but I cannot
> isql connect. If I try with -v then all it says is "Could not connect to
> the datasource".
>
>
>
> If I set up ODBC-only then I am able to isql connect properly. However,
> when running queries I receive a lot of SQLPrepare and SQLExecute errors
> along with inconsistent result sets for the same query.
>
>

Regarding connection probably there is a configuration problem.
Regarding result problems the key is probably update. Either ODBC (the
standard) and unixODBC had problems with 64-bit (and well.. even
FreeTDS but with a 0.82 you shouldn't have any problems).

>
> When I started this I was running FreeTDS .64 (and the errors were
> occurring) so I figured that it would be a good idea to update so I
> downloaded and installed .82. There were no problems during
> installation, but I wouldn't discount something odd happening with my
> configuration because of that. I've pasted my freetds.conf, odbc.ini,
> and odbcinst.ini below. It's currently setup so that I can isql MSSQL
> and get the odd results that I explained above.
>

Assure you are using 0.82 and not the previous version.

>
>
> Thanks in advance.
>
>
>
> odbc.ini
>
> [MSSQL]
>
> Description =  database
>
> Driver = FreeTDS
>
> Server = xxx.xxx.xxx.xxx\Instance
>
> PORT = 1433
>
> DATABASE = GSETP
>
>

Mm.... or server with instance or port, not both. Here you are not
using freetds.conf (ODBC-only). I would add a TDS_Version entry.

>
> odbcinst.ini // looking at this is it possible I need to update the
> driver separately from the program or something along those lines?
>

of course !

> [FreeTDS]
>
> Description       = v0.63 with protocol v8.0
>
> Driver            = /usr/lib/libtdsodbc.so.0
>
> UsageCount        = 2
>
>

/usr/lib/libtdsodbc.so.0 is our driver file.

>
>
>
> freetds.conf
>
> [global]
>
>        # TDS protocol version
>
> ;     tds version = 8.0
>
>
>
> ;     dump file = /tmp/freetds.log
>
> ;     debug flags = 0xffff
>
>
>
>      # Command and connection timeouts
>
> ;     timeout = 10
>
> ;     connect timeout = 10
>
>
>
>      text size = 64512
>
>
>
> [Test]
>
>      host = xxx.xxx.xxx.xxx
>
>      instance = Instance
>
>      tds version = 8.0
>

Not used by isql but by tsql


bye
freddy77




Archive powered by MHonArc 2.6.24.

Top of Page