Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-28575:<unable to open RPC connection to external procedure agent> - error when executing external procedure from PL/SQL

Re: ORA-28575:<unable to open RPC connection to external procedure agent> - error when executing external procedure from PL/SQL

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 04 Mar 1999 02:01:02 GMT
Message-ID: <36dfe8e6.4097501@192.86.155.100>


A copy of this was sent to sriviswa_at_hotmail.com (if that email address didn't require changing) On Thu, 04 Mar 1999 00:27:07 GMT, you wrote:

>Hi,
>
>We are running Oracle 8.0.4 on HP-UX 11. One of our requirements is to fetch
>data from a mainframe database and update our Oracle database. To test the
>proof of concept, we wrote a C program, built it into a .sl library, defined
>it as a LIBRARY in ORACLE and created a stored procedure referencing the
>EXTERNAL C procedure (as defined in the books). We also modified our
>TNSNAMES and LISTENER to add an entry for the EXTPROC process that the
>external procedure call goes thro'. But when executing the procedure we get
>this error message and we have been stuck on this problem for the past four
>days. And I must get it to work within the next one or two days or my ****
>is on the line. Somebody please help. We have been in touch with ORACLE
>online support all this time trying to fix this problem. But no luck.
>

the setting up of the listener and tnsnames file is pretty 'touchy'. Here is some advice (i would suggest to test, backup your existing tnsnames/listener files for a minute, replace them with the simple ones below and add stuff back in from the original or merge these into your original ones to get going)

...
In the event you hit an 'rpc' error in the next steps (eg: the listner is configured wrong), the following might help as well:

You need to setup the listener.ora and tnsnames.ora file for extprocs.

Here is a sample listener.ora file:



LISTENER =
  (ADDRESS_LIST =
    (ADDRESS=(PROTOCOL=IPC)(KEY=oracle81.world))     (ADDRESS=(PROTOCOL=TCP)(Host=sheepdog)(Port=1521))   )
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME=sheepdog.us.oracle.com)
      (ORACLE_HOME= /d01/home/oracle81)
      (SID_NAME = oracle81)

    )
    (SID_DESC =
      (SID_NAME = extproc)
      (ORACLE_HOME = /d01/home/oracle81)
      (PROGRAM = extproc)
      #(ENVS=DEBUG_MODULES=all,DEBUG_FILE=/tmp/test/ext_proc.log)
    )
  )
STARTUP_WAIT_TIME_LISTENER = 0
CONNECT_TIMEOUT_LISTENER = 10

The important things in the listener file for extprocs:

o ADDRESS=(PROTOCOL=IPC)(KEY=oracle81.world))

set up an IPC based listener. remember the value of the KEY= (you can make it whatever you want, just remember what it is)

o (SID_DESC=(SID_NAME=extproc)

remember that SID_NAME, call it extproc.

o (ENVS=DEBUG_MODULES=all,DEBUG_FILE=/tmp/test/ext_proc.log)

if you want a specific set of environment variables setup for your extproc routines, put them here, separated by commas. The above for example, sets up 2 environment variables for the extproc servcies, DEBUG_MODULES and DEBUG_FILE. Since extprocs run detached from a console and are a little touchy to debug, having copious amounts of 'tracing' that you can enable/disable via the environment is suggested (by me)... i use the environment variables to enable/disable tracing in my extprocs

The next file is the tnsnames.ora file, it needs an entry like:



extproc_connection_data =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = oracle81.world))     (CONNECT_DATA = (SID = extproc))
  )

Important things:

o (ADDRESS = (PROTOCOL = IPC)(KEY = oracle81.world))

should be the same as was in the listener.ora file....

o (CONNECT_DATA = (SID = extproc))

the sid must match the sid in the (SID_DESC=(SID_NAME=extproc) from the listener.ora....

Also, if your sqlnet.ora specifies some default domain, it needs to be on the tnsnames entry. So if you have a sqlnet.ora with stuff like:

sqlnet.authentication_services=(none)
names.directory_path = (TNSNAMES, HOSTNAME) names.default_domain = world
name.default_zone = world
automatic_ipc = off

in it, that would be extproc_connection_data.world -- not just extproc_connection_data.

hope this helps...

>Thanks,
>
>Srini.
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Wed Mar 03 1999 - 20:01:02 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US