"SQLAllocHandle on SQL_HANDLE_ENV" error connecting to a DB2
564902Mar 2 2007 — edited Mar 20 2007Hi all,
I'm running a datawarehouse using oracle version 9.0.1.4.0 on a Win2000 machine.
Currently, I access, without problems, different data sources, including MSSQL Server, MSAccess and MySQL, using ODBC and HS .
Now, I must connect to a DB2 database.
I've installed a IBM DB2 ODBC Driver, version 8.01.14.202
Then,I've configured the %ORAHOME%/HS/ADMIN/initDB2SOURCE.ora, as usual
HS_FDS_CONNECT_INFO = DB2SOURCE
HS_FDS_TRACE_LEVEL=1
HS_FDS_FILE_NAME=hsDB2SOURCE.trc
After updating my tnsnames.ora and listener.ora, I've created the dblink and tried to view DB2 data
At first, I received a "specified driver could not be loaded due to system error 5 (IBM DB2 ODBC DRIVER)" error messages, that, after some investigations, I fixed by giving full permissions to DB2 ODBC driver ( in C:\Program Files\IBM\SQLLIB)
But now I'm blocked on the following error
select * from TableName@DB2SOURCE
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Generic Connectivity Using ODBC][Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed (SQL State: IM004; SQL Code: 0)
ORA-02063: preceding 2 lines from DB2SOURCE
Can someone help me?
Thanks
Massimo