Oracle Gateways using DG4DB2

All posts relating to Oracle database administration.

Moderator: Tim...

Oracle Gateways using DG4DB2

Postby mitchcagadas » Tue Nov 13, 2012 7:49 am

Hi Tim,

Installed gateway components in my server to let Oracle - DB2 connect each other however I i could not make it work for days now. Tnsping is working fine with respect to the configured gateway name, but when i try to execute a select statement via db link it continuously fails even after running caths.sql in Oracle HRDBDM01 database. Hope you can help me solve what seem to be the problem here, below are the configuration details.

ORACLE_SID=HRDBDM01
ORACLE_HOME=/oracle/product/11.2.0
Gateway ORACLE_HOME=/oracle/product/11.2.0/gateway/

Code: Select all
SQL> connect hrd401/password_in_oracle_db
Connected.

SQL> create database link db2 connect to "hrd401" identified by "password_of_hrd401_in_db2" using 'dg4db2';
Database link created.

SQL> SELECT * FROM HRNAU2NR.PSSTATUS@DB2;
SELECT * FROM HRNAU2NR.PSSTATUS@DB2
                                *
ERROR at line 1:
ORA-28545: error diagnosed by Net8 when connecting to an agent
Unable to retrieve text of NETWORK/NCR message 65535
ORA-02063: preceding 2 lines from DB2

******

[oracle@mligsb01 11.2.0]$ tnsping dg4db2
TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 13-NOV-2012 14:56:53
Copyright (c) 1997, 2009, Oracle.  All rights reserved.

Used parameter files:
/oracle/product/11.2.0/network/admin/sqlnet.ora

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=mligsb01.safeway.com)(PORT=1522)) (CONNECT_DATA=(SID=dg4db2)) (HS=OK))
OK (0 msec)


Ora files listener, tnsnames and sql.ora of HRDBDM01 Oracle Database
Code: Select all
[oracle@mligsb01 11.2.0]$ cd /oracle/product/11.2.0/network/admin/
[oracle@mligsb01 admin]$ cat listener.ora
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = ************ )(PORT = 1521))                      <-- host = localhost name
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
      )
    )
  )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /oracle/product/11.2.0)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = HRDBDM01)
      (ORACLE_HOME =/oracle/product/11.2.0)
      (SID_NAME = HRDBDM01)
    )
   (SID_DESC=
     (SID_NAME=dg4db2)
     (ORACLE_HOME=/oracle/product/11.2.0/gateway)
     (PROGRAM=/oracle/product/11.2.0/gateway/bin/dg4db2)
      (ENVS=LD_LIBRARY_PATH=/oracle/product/11.2.0/gateway/dg4db2/driver/lib/:/appl/db2/db2cd100/sqllib/lib:/usr/lib:/appl/db2/db2cd100/sqllib/lib64:/appl/db2/db2cd100/sqllib/lib32)
   )
  )

[oracle@mligsb01 admin]$ cat sqlnet.ora
SQLNET.INBOUND_CONNECT_TIMEOUT = 0
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

[oracle@mligsb01 admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /oracle/product/11.2.0/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
dg4db2  =
  (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST= *********** )(PORT=1522))
    (CONNECT_DATA=(SID=dg4db2))
    (HS=OK)
  )


Ora files listener, tnsnames and sql.ora of Oracle Gateway. Init param file for the Target DB2 database.
Code: Select all
[oracle@mligsb01 /]$ cd /oracle/product/11.2.0/gateway/network/admin

[oracle@mligsb01 admin]$ cat listener.ora
# listener.ora Network Configuration File: /oracle/product/11.2.0/gateway/network/admin/listener.ora
# Generated by Oracle configuration tools.

GTWY_LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522))
      (ADDRESS = (PROTOCOL = TCP)(HOST = ********************** )(PORT = 1522))      <-- host = localhost name
    )
  )

ADR_BASE_LISTENER = /oracle/product/11.2.0/gateway

[oracle@mligsb01 admin]$ cat tnsnames.ora
dg4db2  =
  (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST= **************** )(PORT=1522))                        <-- host = localhost name
    (CONNECT_DATA=(SID=dg4db2))
    (HS=OK)
  )
[oracle@mligsb01 admin]$ cat sqlnet.ora
# sqlnet.ora Network Configuration File: /oracle/product/11.2.0/gateway/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
ADR_BASE = /oracle/product/11.2.0/gateway

[oracle@mligsb01 admin]$ cd /oracle/product/11.2.0/gateway/dg4db2/admin/
[oracle@mligsb01 admin]$ cat initdg4db2.ora
# This is a customized agent init file that contains the HS parameters
# that are needed for the Database Gateway for DB2

#
# HS init parameters
#
HS_FDS_CONNECT_INFO=[***************]:482/DBU2,ZOS                       <-- [DB2_IP_ADD_SERVER]:PORT/DB_NAME
HS_FDS_TRACE_LEVEL=OFF
HS_FDS_RECOVERY_ACCOUNT=RECOVER
HS_FDS_RECOVERY_PWD=RECOVER
HS_TRANSACTION_MODEL=COMMIT_CONFIRM
HS_FDS_TRANSACTION_ISOLATION=READ_COMMITTED
HS_FDS_SUPPORT_STATISTICS=TRUE
HS_FDS_RESULTSET_SUPPORT=FALSE
HS_FDS_PACKAGE_COLLID=ORACLEGTW
HS_IDLE_TIMEOUT=0
mitchcagadas
Member
 
Posts: 30
Joined: Sun Jan 30, 2011 5:12 am

Re: Oracle Gateways using DG4DB2

Postby Tim... » Tue Nov 13, 2012 8:36 am

Hi.

Sorry dude. I've never used this product. I suggest you fire off the question to Oracle support and get them to diagnose and fix it. Also, it's worth posting to the OTN forums. Someone there may have used the product.

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17931
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK


Return to Oracle Database Administration

Who is online

Users browsing this forum: No registered users and 10 guests

cron