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: Setting up and calling external procedures

Re: Setting up and calling external procedures

From: Gennaro Napolitano <Gennaro.Napolitano_at_italdata.it>
Date: Fri, 18 Jun 1999 13:11:22 +0200
Message-ID: <376A295A.F92E7883@italdata.it>


Try this:

First of all you need to create an Oracle library to interface your OS library:
CREATE OR REPLACE LIBRARY library_name AS 'Full path of the shared object(*.so or *.dll)';
/

Note: to do this you need the create any library privilege.

Then you need to create an Oracle function to interface your external application:

CREATE OR REPLACE FUNCTION function_name ( Parameters ) RETURN an Oracle datatype AS EXTERNAL
LIBRARY library_name
NAME "The function name"
LANGUAGE C (if you used it)

Then you are able to call your external procedure from a stored procedure or anonymous PL/SQL block:

DECLARE
Yours parameters;
BEGIN
Call the function (Parameters);
END;
/

Hope this help

Ciao Gennaro

"Nicholls, Pamela" wrote:

> Hello,
>
> I need help! I am trying call my external procedure written in 'c'.
>
> Does someone have an example of the tnsnames, listener and the library
> and c program? Any details would be greatly appreciated.
>
> Thanks in advance,
> p.
>
> pamela.nicholls_at_nortel-dasa.de
Received on Fri Jun 18 1999 - 06:11:22 CDT

Original text of this message

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