[freetds] DSN connection problem using Solaris 2.8, unixODBC and freetds

Tref Gare TrefG at areeba.com.au
Mon Apr 14 22:07:50 EDT 2003

Hi list,

I'm relatively new to this stuff in particular and Unix in general.  Hence I'm struggling a bit with getting the configuration right.  I've google trawled and gone through the documentation of both freetds and unixODBC to no avail as yet and the good folk over at unixODBC have been some help but suggested I try this list as well.  Any help will be greatly appreciated.

Our system is:
Solaris 2.8
SQL server 2000
All running through/alongside Apache 2.0.43

The installation went for all of the above went fairly smoothly, but when I try to test the dsn I've created I get nowhere.  Tsql doesn't seem to have been installed with freetds as the documentation is suggesting it should have been so I'm unable to test the freetds elements independently, but when I attempt to test the connections between freetds and unixODBC I'm getting errors suggesting the DSN doesn't exist. 

unixODBC is looking for its system dsn in /usr/local/etc/odbc.ini.  I've hand edited the ini file there (see below) and also the one in the root of the website (root's home) to no avail.

Driver = TDS
Description = PHPBB database
Trace = No
Servername = xxx.xxx.xxx.xxx
Database = foo
UID = bar

When I run isql I get:
#:isql -v phpBBForums bar barpwd
ld.so.1: isql: fatal: relocation error: file /usr/local/freetds/lib/libtdsodbc.so: symbol gethostbyname: referenced symbol not found

freetds.conf lives in /usr/local/freetds/etc/freetds.conf and looks like this
	tds version= 7.0

(blank after odbcinst -i -s -f tds.datasource.template, the following was added manually)
Driver = TDS
Description = PHPBB database
Trace = No
Servername = xxx.xxx.xxx.xxx
Database = phpBB_Forums
UID = blah
PWD = blah

(this populated successfully by odbcinst -i -d -f tds.driver.templatea)
Description		= freetds driver with protocol 7.0
Driver		= /usr/local/freetds/lib/libtdsodbc.so
FileUsage		= 1
Any further guidance/advice will be much appreciated.

"This email is intended only for the use of the individual or entity named above and contains information that is confidential. No confidentiality is waived or lost by any mis-transmission. If you received this correspondence in error, please notify the sender and immediately delete it from your system. You must not disclose, copy or rely on any part of this correspondence if you are not the intended recipient. Any communication directed to clients via this message is subject to our Agreement and relevant Project Schedule. Any information that is transmitted via email which may offend may have been sent without knowledge or the consent of Areeba."

More information about the FreeTDS mailing list