[freetds] CentOS - odbc.ini driver value?

Rich Young rich at experienceplus.com
Fri Jun 9 17:45:23 EDT 2006


Hi, everyone,

I've got a fresh freeTDS 0.63 installation (from source) on CentOS 4.3
that's working fine with tsql, but isql chokes because it can't find the
driver.  

[01000][unixODBC][Driver Manager]Can't open lib '/usr/lib/libtdsodbc.so'
: /usr/lib/libtdsodbc.so: cannot open shared object file: No such file
or directory

Indeed, there's no such file - I copied this setting from the Fedora
server I'm replacing.  But locate (freshly updated) turns up no
libtdsodbc.so filenames anywhere.  The closest I'm able to find is
/usr/lib/libodbc.so or /usr/lib/libtdssrv.so, but those produce a
different error:

[IM004][unixODBC][Driver Manager]Driver's SQLAllocHandle on
SQL_HANDLE_HENV failed
[ISQL]ERROR: Could not SQLConnect

Googling that error indicates that it comes from trying to use the wrong
driver....

/etc/odbcinst.ini contains a clue:

[root at backup etc]# more odbcinst.ini
	# Example driver definitinions
	#
	#
	
	# Included in the unixODBC package
	[PostgreSQL]
	Description     = ODBC for PostgreSQL
	Driver          = /usr/lib/libodbcpsql.so
	Setup           = /usr/lib/libodbcpsqlS.so
	FileUsage       = 1
	
	
	# Driver from the MyODBC package
	# Setup from the unixODBC package
	#[MySQL]
	#Description    = ODBC for MySQL
	#Driver         = /usr/lib/libmyodbc.so
	#Setup          = /usr/lib/libodbcmyS.so
	#FileUsage      = 1

There's no mention of FreeTDS in here - did my install (which was from
source) fail to find unixODBC and thus fail to add the necessary
unixODBC driver?  If so, what is my next step?  Do I need to redo the
build from ./configure with the 
--with-unixodbc=DIR
switch on?  (And how do I know what to tell it for the value of DIR?)

Thanks for any help y'all can provide,

-Rich Young



More information about the FreeTDS mailing list