I got the latest release of unixodbc installed. I now have issues in connectivity.
i get the error as "Failed to load ODBC library symbol: /usr/local/unixODBC-2.3.2/lib/libodbc.so(SQLAllocHandle)"
I checked the version of both the libodbc.so and for dg4odbc, they both are 64 bit and i have mentioned the correct name in the HS_SHAREABLE_NAME. why do i still get the error? what else do i need to check on?
[root@l52orci11 log]# file /u01/app/oracle/product/18.104.22.168/hs/lib/dg4odbc.o
/u01/app/oracle/product/22.214.171.124/hs/lib/dg4odbc.o: ELF 64-bit LSB relocatable, AMD x86-64, version 1 (GNU/Linux), not stripped
[root@l52orci11 log]# file /usr/local/unixODBC-2.3.2/lib/libodbc.so.2.0.0
/usr/local/unixODBC-2.3.2/lib/libodbc.so.2.0.0: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped
Entered hgolofns at 2014/06/12-14:40:08
Exiting hgolofns at 2014/06/12-14:40:08
Failed to load ODBC library symbol: /usr/local/unixODBC-2.3.2/lib/libodbc.so(SQL
Exiting hgolofn, rc=28500 at 2014/06/12-14:40:08
Exiting hgoinit, rc=28500 with error ptr FILE:hgoinit.c LINE:417 FUNCTION:hgoini
t() ID:Loading ODBC aray of function ptrs
HS Gateway: NULL connection context at exit
Exiting hgoexit, rc=0 with error ptr FILE:hgoexit.c LINE:110 FUNCTION:hgoexit()
Could you please make sure that you can connect to the foreign database using the ODBC driver when connected as Oracle user? Make sure to set the LD_LIBRARY_PATH to include /usr/local/unixODBC-2.3.2/lib and /export/home/db2admin/sqllib/lib. Then export also the ODBCINI environment variable pointing to your odbc.ini file and check isql -v <DSN> <uid> <pwd>
and what is reported when you execute as Oracle user "odbcinst -j"?
Just in case that output is fine then let's enable strace:
1. get the PID of your Oracle listener spawning the gateway: ps -ef|grep tns
2. start strace: strace -fae -o dg4odbc.log -p <PID of the Gateway listener>
3. Now open SQL*Plus and execute any statement through the gateway.
4. when the error is raised, exit from SQL*Plus, cancel strace and upload the dg4odbc.log to a file share location.
I set the LD_LIBRARY_PATH and the sqlplus was working fine. however, i noticed the below message still being populated in the log file, this is causing the output of the select stmt displaying incorrectly.
Default value of 64 assumed for HS_FDS_SQLLEN_INTERPRETATION
Invalid value of 64 given for HS_FDS_SQLLEN_INTERPRETATION
treat_SQLLEN_as_compiled = 1
Exiting hgoinit, rc=0 at 2014/06/20-08:43:08
when i run this query
SELECT "PSNID","ORG_ID","MEMBER_FROM_DT","MEMBER_THRU_DT","UPDATE_TSTP" FROM "DB2OC2_ORG_MEMBER" WHERE "PSNID"=11690132 AND "MEMBER_FROM_DT"<='2014-04-14'
The values expected is as below
PSNID ORG_ID MEMBER_FROM_DT MEMBER_THRU_DT UPDATE_TSTP
11690132 1278 2014-04-14 ---------- 2014-04-16-126.96.36.199000
However, notice the value for the column MEMBER_THRU_DT which is actually blank, is being reutned as 00-DECEMB when HS_FDS_SQLLEN_INTERPRETATION=64.
when HS_FDS_SQLLEN_INTERPRETATION=32 the value is blank.
when using Isql as well, the value from MEMBER_FROM_Dt is populated in MEMBER_THRU_DT instead of blank
Please refer to post 26 for more details
Sorry about that. It looks like Klaus already took you down the path I was going.
What version of DG4ODBC are you using?
I ask because I found a bug (Bug:12684053) dealing with the way DG4ODBC handle ODBC datatypes converted to Oracle Date.
The bug is fixed in 188.8.131.52. I'm not positive you are encountering this issue, but it is possible.
Can you check if the bug number mentioned is correct? i get the below message when trying to view it
Requested Bug could not be displayed. Possible reasons are:
•The bug id was entered incorrectly. Please check and try again.
•The bug id does not exist (was referenced incorrectly).
•The bug is not classified as publicly accessible ("non-public").
•The content is being updated and it is temporarily unavailable but will be made available again soon
I checked the bug details. however, i believe its not related to my issue.
i am able to browse date fields normally and timestamps as well. however, my concern is why would a field that is blank have a ramdom date populated. can blanks not be returned as blank? however, when i set the HS_FDS_SQLLEN_INTERPRETATION=32, all is good.
I'm not sure where to go from here with this. I still think it is worth applying 184.108.40.206 to the gateway home to eliminate the possibility.
Additionally, you might want to consider testing with a different ODBC driver to see if that makes any difference.
Maybe someone else has an additional suggestion,