1 2 3 Previous Next 41 Replies Latest reply: Jun 24, 2014 6:31 AM by mxallen-Oracle Go to original post RSS
      • 30. Re: DG4ODBC connectivety to DB2
        Santosh_DBA

        Hi Klaus,

         

        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?

         

         

        HS_FDS_SHAREABLE_NAME=/usr/local/unixODBC-2.3.2/lib/libodbc.so

        set ODBCINI=/usr/local/unixODBC-2.3.2/etc/odbc.ini

         

        [root@l52orci11 log]# file /u01/app/oracle/product/11.2.0.2/hs/lib/dg4odbc.o

        /u01/app/oracle/product/11.2.0.2/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

        hoaerr:28500

        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

        AllocHandle)

        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

        Entered hgoexit

        HS Gateway:  NULL connection context at exit

        Exiting hgoexit, rc=0 with error ptr FILE:hgoexit.c LINE:110 FUNCTION:hgoexit()

        ID:Connection context

         

         

        Thanks

        Santosh

        • 31. Re: DG4ODBC connectivety to DB2
          Kgronau-Oracle

          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.

          • 32. Re: DG4ODBC connectivety to DB2
            Santosh_DBA

            Hi Klaus,

             

            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

             

            Thanks

            Santosh

            • 33. Re: DG4ODBC connectivety to DB2
              mxallen-Oracle

              Santosh -

               

              Try setting HS_FDS_SQLLEN_INTERPRETATION=32 in the gateway init file.

               

              If that does not help, please let us know exactly what is being returned to the screen incorrectly, with both the HS_FDS_SQLLEN_INTERPRETATION=32

              in the file and without it in the file.

               

              Regards,

              Matt

              • 34. Re: DG4ODBC connectivety to DB2
                Santosh_DBA

                Hi Matt,


                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-16.58.37.179000

                 

                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

                 

                Thanks
                Santosh

                • 35. Re: DG4ODBC connectivety to DB2
                  mxallen-Oracle

                  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 11.2.0.4.  I'm not positive you are encountering this issue, but it is possible.

                   

                  - Matt

                  • 36. Re: DG4ODBC connectivety to DB2
                    Santosh_DBA

                    Matt,

                    the DG4ODBC version i am using is 11.2.0.2

                    Thanks

                    Santosh

                    • 37. Re: DG4ODBC connectivety to DB2
                      mxallen-Oracle

                      Santosh,

                       

                      If you are encountering the bug mentioned in my last post, it is fixed in 11.2.0.4.

                       

                      Regards,

                      Matt

                      • 38. Re: DG4ODBC connectivety to DB2
                        Santosh_DBA

                        Matt,

                         

                        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

                         

                        Thanks

                        Santosh

                        • 39. Re: DG4ODBC connectivety to DB2
                          mxallen-Oracle

                          Santosh,

                           

                          Try this instead:  Bug 12684053 - Select of DATE column gets ORA-28500 over HS (Doc ID 12684053.8)


                          -Matt

                          • 40. Re: DG4ODBC connectivety to DB2
                            Santosh_DBA

                            Hi Matt,

                             

                            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.

                             

                            Thanks

                            Santosh

                            • 41. Re: DG4ODBC connectivety to DB2
                              mxallen-Oracle

                              Santosh,

                               

                              I'm not sure where to go from here with this.  I still think it is worth applying 11.2.0.4 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,

                               

                              Regards,

                              Matt

                              1 2 3 Previous Next