[unixODBC-support] Failed to load ODBC library symbol: /usr/local/libodbc.so.1(SQLAllocHandle)

Tacho tachoymu at gmail.com
Thu Jul 15 01:01:05 BST 2010


I have a problem related to Oracle11g to SQL Server  2005 connection
from SQL*Plus:

Failed to load ODBC library symbol: /usr/local/libodbc.so.1(SQLAllocHandle)

but when using odbc testing by running isql or tsql everthing is fine,
as is shown below:

Unix> isql SQLSERVER sa sapswd -v
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> select * from conn_detalle;
+------------+
| id         |
+------------+
+------------+
SQLRowCount returns 0

Unix> tsql -H 192.168.99.99  -p 1433 -U sa -P sapswd
locale is "en_US en_US en_US en_US en_US en_US"
locale charset is "ISO8859-1"
1> quit

both isql and tsql work fine if the following environment variable are
set before run them:

TDSVER="8.2";export TDSVER
TDSPORT="1433";export TDSPORT
TDSHOST="192.168.99.99";export TDSHOST
ODBCINI="/usr/local/etc/odbc.ini";export ODBCINI
FREETDS="/usr/local/etc/freetds.conf";export FREETDS

and then we run isql and tsql successfully as we did above.

contents of /usr/local/etc/odbc.ini:

[SQLSERVER]
Driver = TDS
Trace = Yes
TraceFile = /tmp/sqlserver.log
Servername =  192.168.99.99
Database = DBTEST
Port = 1433

contents of /usr/local/etc/odbcinst.ini:

[TDS]
Description = FreeTDS driver
driver = /usr/local/lib/libtdsodbc.so.0
Setup = /usr/local/lib/libtdsodbc.so.0
Trace = Yes
TraceFile = /tmp/freetds.log
FileUsage = 1

contents of /usr/local/etc/freetds.conf:

# A typical Microsoft server
[SQLSERVER]
	host = 192.168.99.99
	port = 1433
	tds version = 8.2

any help will be appreciated.

Regards,
Tacho


More information about the unixODBC-support mailing list