Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: external stored procedure help
A copy of this was sent to yhpeh_at_my-deja.com
(if that email address didn't require changing)
On Mon, 16 Aug 1999 03:41:30 GMT, you wrote:
>Hi,
> I have tried to run a simple external stored procedure in Oracle
>8.0.5 for Solaris 2.6. I keep getting the following error. Any help is
>apreciated.
>
>ORA-28575: unable to open RPC connection to external procedure agent
>
>The configuration of listener.ora & tnsnames.ora is as follows:
>
>listener.ora
>-------------
>LISTENER =
> (ADDRESS_LIST =
> (ADDRESS= (PROTOCOL= TCP)(Host= singemsd01)(Port= 1521))
> (ADDRESS= (PROTOCOL= IPC)(KEY= extproc)))
> )
[snip]
>
>tnsnames.ora
>------------
>extproc_connection_data.world =
> (DESCRIPTION =
> (ADDRESS = (PROTOCOL = IPC)
> (KEY = GEM2)
> )
> (CONNECT_DATA = (SID = extproc))
> )
>
[snip]
Key Mismatch. In the listener you have key=extproc. In the tnsnames you have key=gem2. change one of them so they are consistent.
this short note typically helps you find the error -- just check off the items one by one and then it works (thats how I found your key error)
...
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:
(GLOBAL_DBNAME=sheepdog.us.oracle.com) (ORACLE_HOME= /d01/home/oracle81) (SID_NAME = oracle81)
(SID_NAME = extproc) (ORACLE_HOME = /d01/home/oracle81) (PROGRAM = extproc) #(ENVS=DEBUG_MODULES=all,DEBUG_FILE=/tmp/test/ext_proc.log))
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)...
The next file is the tnsnames.ora file, it needs an entry like:
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.
>
>When I checked the listener status, both GEM2 and extproc services are
>started successfully. But Oracle will complain RPC connection error
>whenever run the external store procedure. I have been tinkering with
>the ora files for a few days with no results. The test program is as
>follows:
>
>square.c
>--------
>#include <stdio.h>
>
>int square(int square) {
>return x*x;
>}
>
>create library squarelib as '/usr/home/yhpeh/square.so'
>
>create function square_of(x binary_integer) return binary_integer as
>external library squarelib name "square" language C;
>
>Rgds,
>yew hock
>
>
>
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
--
See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries Reston, VA USA
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Mon Aug 16 1999 - 07:23:26 CDT
![]() |
![]() |