5 Replies Latest reply: Jul 5, 2013 9:35 AM by iwish RSS

    gateway and database in a different oracle_home

    iwish

      Hi:

        my env : rhel5.8  oracle10G x86_64

        the gateways 's version is  oracle11g

        so I install the gateway into  another path

        How to I configure the listener?

        I mean which listenr.ora should I configure .

       

      [oracle@server1 bin]$ pwd

      /opt/app/product/11.2.0/dbhome_1/bin

      [oracle@server1 bin]$ ./lsnrctl start listerner1

      LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 04-JUL-2013 16:45:40

      Copyright (c) 1991, 2009, Oracle.  All rights reserved.

      Starting /opt/app/product/10.2.0/db_1/bin/tnslsnr: please wait...

      TNSLSNR for Linux: Version 10.2.0.5.0 - Production

      System parameter file is /opt/app/product/10.2.0/db_1/network/admin/listener.ora

       

      11g lsnrctl used 10g's tnslsnr  and listener.ora ,

       

      thanks.

        • 1. Re: gateway and database in a different oracle_home
          DK2010

          Hi,

           

          You have to set the ORACLE_HOME under the listener.ora file.

          • 2. Re: gateway and database in a different oracle_home
            iwish

            thanks .

            cat /opt/app/product/11.2.0/dbhome_1/network/admin/listener.ora

            SID_LIST_LISTENER1 =

              (SID_LIST =

                (SID_DESC =

                  (PROGRAM = dg4odbc)

                  (SID_NAME = dg4odbc)

                  (ORACLE_HOME = /opt/app/product/11.2.0/dbhome_1)

                  (ENVS=LD_LIBRARY_PATH = /usr/lib:/usr/lib64:/opt/app/product/11.2.0/dbhome_1/lib)

                )

              )

             

            ADR_BASE_LISTENER1= /opt/app

             

            LISTENER1=

              (DESCRIPTION_LIST =

                (DESCRIPTION =

                  (ADDRESS = (PROTOCOL = TCP)(HOST = server1)(PORT = 1522))

                )

              )

             

            ~

            ~

            ~

            • 3. Re: gateway and database in a different oracle_home
              iwish

              I created another user to install oracle11g gateways ,

              but still has problem

              odbc trace

               

              [SQLSetConnectAttr.c][295]Error: SQL_INVALID_HANDLE

              [SQLGetDiagRec.c][524]Error: SQL_INVALID_HANDLE

               

               

              gateway debug log

               

              SQLGetDiagRec returns rc=-2 (SQL_INVALID_HANDLE) for handle ef29e60 (SQL_HANDLE_DBC)

              Call to SQLDiagRec for Environment handle 0xef25cb0returns -2 (SQL_INVALID_HANDLE)

              Exiting hgopoer, rc=0 at 2013/07/05-11:33:00 with error ptr FILE:hgopoer.c LINE:188 FUNCTION:hgopoer() ID:GetDiagRec err

              or

              hgolgon, line 261: calling SQLSetconnectAttr got sqlstate

              Exiting hgolgon, rc=28500 at 2013/07/05-11:33:00 with error ptr FILE:hgolgon.c LINE:261 FUNCTION:hgolgon() ID:Connection

              Attribute: AUTOCOMMIT

              Entered hgoexit at 2013/07/05-11:33:00

              Exiting hgoexit, rc=0

              ~

              ~

              /etc/odbc.ini

               

              [mysqldb]

              Driver = /usr/lib64/libmyodbc5w.so

              Server = 10.10.1.21

              User = root

              Password = asdf1234

              Port = 3306

              database = mktdb

              TraceFile=/tmp/sql.log

              Trace=yes

               

               

              listener.ora

               

              DG1=

              (DESCRIPTION_LIST=

                (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=server1)(port=1522)))

                )

               

              SID_LIST_DG1=

                (SID_LIST=

                 (SID_DESC=

                   (SID_NAME=mysqldb)

                   (ORACLE_HOME=/opt/oracle/app/product/11.2.0/db_1)

                   (PROGRAM=dg4odbc)

                   (ENVS="LD_LIBRARY_PATH=/opt/oracle/app/product/11.2.0/db_1/lib:/usr/lib64:/usr/lib")

                  )

                 )

               

              initmysqldb.ora

              HS_FDS_CONNECT_INFO = mysqldb

              HS_FDS_TRACE_LEVEL=4

              HS_LANGUAGE=AMERICAN_AMERICA.WE8ISO8859P1

              HS_FDS_SHAREABLE_NAME =  /usr/lib64/libmyodbc5w.so

              #HS_FDS_SQLLEN_INTERPRETATION=32

              HS_LONG_PIECE_TRANSFER_SIZE=1258291

              set ODBCINI=/etc/odbc.ini

              • 4. Re: gateway and database in a different oracle_home
                Billy~Verreynne

                Confirm that, as the same o/s user that the gateway runs as (e.g. oracle or grid), the CLI utility isql works for the same DSN and credentials. E.g.

                 

                isql -v mysqldb <username> <password>

                 

                There also is a dedicated forum space called Heterogeneous Connectivity that deals specifically with these issues - and actual Oracle Support staff frequents the forum space and provide assistance.

                • 5. Re: gateway and database in a different oracle_home
                  iwish

                  I have fixed this problem

                  I downgrade mysql-connector-odbc from 5.2 to 5.1

                  and

                  change HS_FDS_SHAREABLE_NAME =  /usr/lib64/libmyodbc5w.so

                  to HS_FDS_SHAREABLE_NAME =  /usr/lib64/libmyodbc5.so

                   

                  it works well

                   

                  thanks all