Skip to Content.
Sympa Menu

freetds - Re: FreeTDS with unixODBC

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: J Kevin Martineau <kevinmartineau AT senets.com>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: FreeTDS with unixODBC
  • Date: 20 Sep 2002 18:04:36 -0400


First, just a quick thanks to the replies. I have gone through the
process of removing/installing just to verify my setup. So, here goes...

I'm running the Red Hat beta (null -- 7.3.94) with the latest updates.

The freetds.conf is in the /usr/local/etc. I took the template for the
typical SQL Server and changed the relevant portions. I compiled Freetds
from the source.

[global]
# TDS protocol version
tds version = 7.0
initial block size = 512
swap broken dates = no
; swap broken money = no
try server login = yes
try domain login = no
; nt domain = WORKGROUP
cross domain login = no
dump file = /home/jkmartin/freetds.log
debug level = 10
; timeout = 10;
; connect timeout = 10;

[robby]
host = 192.168.1.125
port = 1433
tds version = 7.0

The odbcinst.ini is located in the /etc directory -- I installed
unixODBC from the Red Hat rpm.

[PostgreSQL]
Description = ODBC for PostgreSQL
Driver = /usr/lib/libodbcpsql.so
Setup = /usr/lib/libodbcpsqlS.so
FileUsage = 1

[Text]
Description = ODBC for Text Files
Driver = /usr/lib/libodbctxt.so
Setup = /usr/lib/libodbctxtS.so
FileUsage = 1
CPTimeout =
CPReuse =

[MDB]
Description = ODBC for MS Access databases
Driver = /usr/local/lib/libmdbodbc.so
Setup = /usr/lib
FileUsage = 1
CPTimeout =
CPReuse =

[TDS]
Description = ODBC for TDS (Sybase/MSSQL)
Driver = /usr/lib/libtdsS.so
Setup =
FileUsage = 1
CPTimeout =
CPReuse =

The user odbc.ini.

[HMF]
Driver = TDS
Description = HMC TRENDSTAR Interface
Trace = Yes
Servername = robby
Database = hmf_interface
UID = sa

With logging I get the following output (with TDSDUMPCONFIG).

2002-09-20 18:00:31 Attempting to read conf files.
2002-09-20 18:00:31 Found conf file in (default). Reading section
robby.
2002-09-20 18:00:31 Looking for section global.
2002-09-20 18:00:31 ... Found section global.
2002-09-20 18:00:31 Got a match.
2002-09-20 18:00:31 option = 'tds version' value = '7.0'.
2002-09-20 18:00:31 option = 'initial block size' value = '512'.
2002-09-20 18:00:31 option = 'swap broken dates' value = 'no'.
2002-09-20 18:00:31 no is a 'no/off/false'.
2002-09-20 18:00:31 option = 'try server login' value = 'yes'.
2002-09-20 18:00:31 yes is a 'yes/on/true'.
2002-09-20 18:00:31 option = 'try domain login' value = 'no'.
2002-09-20 18:00:31 no is a 'no/off/false'.
2002-09-20 18:00:31 option = 'cross domain login' value = 'no'.
2002-09-20 18:00:31 UNRECOGNIZED option 'cross domain login'...ignoring.
2002-09-20 18:00:31 option = 'dump file' value =
'/home/jkmartin/freetds.log'.
2002-09-20 18:00:31 option = 'debug level' value = '10'.
2002-09-20 18:00:31 ... Found section jdbc.
2002-09-20 18:00:31 ... Found section robby.
2002-09-20 18:00:31 Looking for section robby.
2002-09-20 18:00:31 ... Found section global.
2002-09-20 18:00:31 ... Found section jdbc.
2002-09-20 18:00:31 ... Found section robby.
2002-09-20 18:00:31 Got a match.
2002-09-20 18:00:31 option = 'host' value = '192.168.1.125'.
2002-09-20 18:00:31 Found host entry 192.168.1.125.
2002-09-20 18:00:31 IP addr is 192.168.1.125.
2002-09-20 18:00:31 option = 'port' value = '1433'.
2002-09-20 18:00:31 option = 'tds version' value = '7.0'.
2002-09-20 18:00:31 ...Success.
2002-09-20 18:00:31 Setting 'dump_file' to 'freetds.log' from $TDSDUMP.


One note -- unixODBC's graphical configuration tool will segfault when
attempting to add a DSN using the TDS odbc driver. I assume this is due
to the lack of the setup file. The odbcinst program doesn't seem to mind
that the setup file is missing.

I'm really trying to move to a Linux desktop for most of my work due to
problems with WinXP. Getting ODBC to work is a significant part of that
process. Again, thanks for any help.


On Fri, 2002-09-20 at 01:52, James K.Lowden wrote:
> On 19 Sep 2002 23:16:02 -0400, "J Kevin Martineau"
> <kevinmartineau AT senets.com> wrote:
>
> > Using the verbose mode I get the additional error:
> >
> > [unixODBC]tds_connect failed
>
> "Could not SQLConnect" because "tds_connect failed"? What, the Microsoft
> School of error messages? Er, do you think we should point out that not
> everyone would necessary agree with their definition of verbose?
> </harumph>
>
> Kevin, I think your best bet would be to try turning on logging. In the
> FreeTDS log, you'll see the connection attempt (if attempt there be)
> including username and password. Probably you'll see something in there
> unbecoming of a server. If not, post here and be amazed at our powers of
> speculation.
>
> I don't use ODBC myself, but I might be able to help you narrow down
> what's going on.
>
> Can anyone speak to the quality of our ODBC error handling? The model is
> very different from dblib and ctlib. The app AIUI is supposed to notice
> an error return code, and call another function to determine the nature of
> the error. Do we support that, at login?
>
> Regards,
>
> --jkl
>
>
> ---
> You are currently subscribed to freetds as: [kevinmartineau AT senets.com]
> To unsubscribe, forward this message to $subst('Email.Unsub')
>
--
Kevin Martineau
kevinmartineau AT senets.com
(404) 724-0057
Fax (509) 757-7967
Cel (404) 277-4484





Archive powered by MHonArc 2.6.24.

Top of Page