ODBC / FreeTDS on Knoppix/Debian

psema4 psema4-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Fri May 13 03:22:00 UTC 2005


I'm praying someone out there has configured unixODBC and FreeTDS on
Debian before...

I've been at this steady for about week now (still learning how to
customize Knoppix, and Debian in general.  Till now, I was almost
entirely a RedHat guy).

This particular issue, however, is driving me absolutely bananas.

I'm trying to put together a Knoppix CD with unixODBC and FreeTDS
pre-configured;  everything's going well - except that I can't
configure unixODBC and FreeTDS!

Maybe I'll have to break down and just compile/build instead of using
the apt packages, but  if anyone knows how to determine where unixODBC
is looking for it's DSN's it would save me some grief.  Unfortunately,
I'm already overdue on this project.  :(


Here's some output for anyone interested in the problem:

(using unixodbc-2.2.4-11, freetds0-0.53-7)

[ -- output starts --]

root at 2[tests]# echo $ODBCSYSINI
/etc/odbc.ini


root at 2[tests]# echo $FREETDS
/etc/freetds/freetds.conf


root at 2[tests]# cat $ODBCSYSINI
[Default]
Driver          = FreeTDS

[LOKI_TEST]
Driver          = FreeTDS
Description     = Test Database on Loki
Trace           = No
Servername      = LOKI
Database        = Northwind
UID             = tuser


root at 2[tests]# cat $FREETDS
#
#
#   $Id: freetds.conf,v 1.7 2002/10/17 15:11:02 castellano Exp $
#
# The freetds.conf file is a replacement for the original interfaces
(comments snipped for brevity)
#
# Global settings, any value here may be overridden by a database
# server specific section
[global]
        # TDS protocol version
        tds version = 4.2
 
        initial block size = 512
 
        swap broken dates = no
 
        swap broken money = no
 
        # Database server login method, if both server and domain
        # logins are enabled, domain login is tried first if a domain
        # is specified, and if that fails the server login will be used.
        try server login = yes
        try domain login = no
 
        # The default authentication domain, can be overridden by
        # specifying a username with a domain prefix, e.g. DOMAIN\username
;       nt domain = WORKGROUP
 
        # If the server responds with different domain try that one?
        cross domain login = no
 
        # Whether to write a TDSDUMP file for diagnostic purposes
        # (setting this to /tmp is insecure on a multi-user system)
;       dump file = /tmp/freetds.log
;       debug level = 10
 
        # Command and connection timeouts
;       timeout = 10
;       connect timeout = 10
 
        # If you get out of memory errors, it may mean that your client
        # is trying to allocate a huge buffer for a TEXT field.
        # (Microsoft servers sometimes pretend TEXT columns are
        # 4 GB wide!)   If you have this problem, try setting
        # 'text size' to a more reasonable limit
        text size = 64512
 (more comments and samples snipped)
 
# Test Server
[LOKI]
        host = 192.168.0.101
        port = 1433
        tds version = 7.0
 

root at 2[tests]# cat /etc/odbcinst.ini
[FreeTDS]
Description     = TDS driver (Sybase/MS SQL)
Driver          = /usr/lib/odbc/libtdsodbc.so
Setup           = /usr/lib/odbc/libtdsS.so
FileUsage       = 1


root at 2[tests]# perl test.pl
DBI connect('LOKI_TEST','tuser',...) failed: [unixODBC][Driver
Manager]Data source name not found, and no default driver specified
(SQL-IM002)(DBD: db_login/SQLConnect err=-1) at
/usr/local/lib/perl/5.8.3/SAL/DBI.pm line 142
[unixODBC][Driver Manager]Data source name not found, and no default
driver specified (SQL-IM002)(DBD: db_login/SQLConnect err=-1) at
/usr/local/lib/perl/5.8.3/SAL/DBI.pm line 142
        SAL::DBI::spawn_odbc('SAL::DBI=HASH(0x8843d28)','LOKI_TEST','tuser','tuser','Northwind')
called at test.pl line 8

root at 2[tests]# 

[ -- output ends --]


Any and all help will would be most appreciated.

Thanks,
- Scott

-- 
- SGE
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list