Link to home
Start Free TrialLog in
Avatar of Tomas Helgi Johannsson
Tomas Helgi JohannssonFlag for Iceland

asked on

Oracle 11G on Linux - DB2 Gateway problem

        Hi!

I'm trying to setup a gateway between Oracle 11G on Linux and DB2 on Mainframe.
I have setup an Oracle 11G version 11.2.0.1 under oracle user and Oracle DRDA Gatway on another user account (oragate)
Doing TNSPING on both the database SID and the gateway SID seems ok as they respond.
The problem I'm facing is that when I (logged in as SYSTEM user) create a database LINK on a fixed DB2 user I get ORA-28513 and ORA-02063 when testing the link.
I have setup a DB2 Connect and I am able to connect to the DB2 easily using the db2 connect command line. Also the initSID.ora file is correctly pointing to the DB2 host and configured properly.

Please help.

Regards,
    Tomas Helgi
Avatar of Praveen Kumar Chandrashekatr
Praveen Kumar Chandrashekatr
Flag of India image


Could you please post your gateway listener.ora file, your tnsnames.ora file located in the Oracle database and  the listener status of the gateway listener (lsnrctl status <gateway listener name>)

tnsping output using the configured tns alias from your Oracle database home (tnsping <gateway tn alias>).

Avatar of Tomas Helgi Johannsson

ASKER

listener.ora -----
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = myhost.localdomain)(PORT = 1521))    
      (ADDRESS = (PROTOCOL = TCP)(HOST = myhost.localdomain)(PORT = 1523))
    )
  )

SID_LIST_LISTENER =
   (SID_LIST =
     (SID_DESC =
      (GLOBAL_DBNAME = DB11GT )
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1 )
      (SID_NAME = DB11GT )
     )
     (SID_DESC=
       (SID_NAME=GTW11T)
       (ORACLE_HOME=/u02/app/oracle/product/11.2.0/gtw_1)
       (ENVS=LD_LIBRARY_PATH=/u02/app/oracle/product/11.2.0/gtw_1/dg4db2/driver/lib;/u02/app/oracle/product/11.2.0/gtw_1/lib)  
       (PROGRAM=dg4db2)
     )
   )

ADR_BASE_LISTENER = /u01/app/oracle
------
tnsnames.ora -------
DB11GT=
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = myhost.localdomain)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DB11GT.localdomain)
    )
  )

GTW11T=
  (DESCRIPTION=
    (ADDRESS=(PROTOCOL=TCP)(HOST = myhost.localdomain)(PORT=1523))
    (CONNECT_DATA=(SID=GTW11T))
    (HS=OK)
  )
------
listener status ------
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 01-NOV-2011 09:23:19

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                30-OCT-2011 14:22:36
Uptime                    1 days 19 hr. 0 min. 42 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/dbsandkassi4/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1523)))
Services Summary...
Service "DB11GT" has 1 instance(s).
  Instance "DB11GT", status UNKNOWN, has 1 handler(s) for this service...
Service "DB11GT.localdomain" has 1 instance(s).
  Instance "DB11GT", status READY, has 1 handler(s) for this service...
Service "DB11GTXDB.localdomain" has 1 instance(s).
  Instance "DB11GT", status READY, has 1 handler(s) for this service...
Service "GTW11T" has 1 instance(s).
  Instance "GTW11T", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

-------
tnsping ----
TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 01-NOV-2011 09:25:35

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

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


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=TCP)(HOST = myhost.localdomain)(PORT=1523)) (CONNECT_DATA=(SID=GTW11T)) (HS=OK))
OK (40 msec)

------

Listener.ora and tnsnames.ora are also configured in the gateway network/admin directory.

Regards,
    Tomas Helgi
i hope this what you have used to create the DB link

create database link test connect to username identified by pwd using 'GTW11T';

and i hope all HS parameters set in you initsid.ora file for gateway.

 
Yes, all parameters in the initsid.ora are correct.
However when I create the database link like this
create database link test connect to username identified by pwd using 'GTW11T';
i get the linke name like this
TEST.LOCALDOMAIN
and the above ORA errors when I test the connection.

Regards,
   Tomas Helgi
ASKER CERTIFIED SOLUTION
Avatar of Tomas Helgi Johannsson
Tomas Helgi Johannsson
Flag of Iceland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I found the error myself.