?
Solved

Oracle 11G on Linux - DB2 Gateway problem

Posted on 2011-10-31
6
Medium Priority
?
1,580 Views
Last Modified: 2013-11-11
        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
0
Comment
  • 4
  • 2
6 Comments
 
LVL 12

Expert Comment

by:Praveen Kumar Chandrashekatr
ID: 37060848

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>).

0
 
LVL 26

Author Comment

by:Tomas Helgi Johannsson
ID: 37061573
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
0
 
LVL 12

Expert Comment

by:Praveen Kumar Chandrashekatr
ID: 37061930
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.

 
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 26

Author Comment

by:Tomas Helgi Johannsson
ID: 37062115
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
0
 
LVL 26

Accepted Solution

by:
Tomas Helgi Johannsson earned 0 total points
ID: 37062516
             Hi!

I found what I was doing wrong.
The initsid.ora file was in a wrong place. For some reason I had put it into the <ORA_HOME>/network/admin of the gateway
when it should be in the <ORA_HOME>/dg4db2/admin/

Regards,
   Tomas Helgi
0
 
LVL 26

Author Closing Comment

by:Tomas Helgi Johannsson
ID: 37089737
I found the error myself.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question