Why do I get error "Initialization function SQLAllocConnect not found" when using Oracle Heterogenous Services (HSODBC) on AIX?
Assumptions:
- You're using the unixODBC Driver Manager. (It does not matter if you built it yourself or are using the one that's included in the Easysoft ODBC driver distribution.)
- You've set your
LIBPATH
correctly to include the Driver Manager library paths. (For example,/usr/local/easysoft/unixODBC/lib
and/usr/local/easysoft/lib
). - You're getting an error similar to the one below when attempting to use your database link in SQL*Plus:
ERROR at line 1: ORA-28500: connection from ORACLE to a non-Oracle system returned this message: [Generic Connectivity Using ODBC]DRV_InitTdp: DB_ODBC_INTERFACE(6); Initialization function SQLAllocConnect not found DB_ODBC_INTERFACE(7); Cannot connect to shareable /usr/local/easysoft/unixODBC/lib/libodbc.a. Using dummy functions ORA-02063: preceding 3 lines from OCI1
On AIX, this problem occurs because Oracle's ODBC agent (HSODBC) is linked against libodbc.so
, but the unixODBC Driver Manager you're using contains libodbc.so.1
in the libodbc.a
archive . To check this:
-
cd /usr/local/easysoft/unixODBC/lib
–Or–
cd /lib
–Or–
cd unixODBC_install_dir
-
ar -X32_64 -tv libodbc.a
If this shows the archive contains libodbc.so.1
, this is your problem. The solution is:
- Become root or whoever you need to be to create files in the unixODBC
lib
subdirectory. -
cd /usr/local/easysoft/unixODBC/lib
–Or–
cd /lib
–Or–
cd unixODBC_install_dir
-
ar -X32_64 -xv libodbc.a
This should extract the file
libodbc.so.1
to the current directory. - Rename
libodbc.so.1
:mv libodbc.so.1 libodbc.so
- Point HSODBC at it directly by changing the
HS_FDS_SHAREABLE_NAME
parameter in yourinitname.ora
file to be:HS_FDS_SHAREABLE_NAME = /usr/local/easysoft/unixODBC/lib/libodbc.so
Restart your Oracle listener. Your link should now work.