Re: Newbie for External Procedures

From: Finn Ellebaek Nielsen <ellebaek-consulting_at_post3.tele.dk>
Date: 1998/09/06
Message-ID: <35F2739D.756126DA_at_post3.tele.dk>#1/1


Yes, as I posted as a response to another question:

In Oracle8 you can call external 3GL code in a dynamically linked library (DLL or shared object). So you just write a library in C doing what you want, ie in your case a host function taking the command line as input argument. And that function will be callable from PL/SQL.

So what you have to do is more or less:

  1. Write C code in host.c: int host(char *command) { ... }.
  2. Compile C code to DLL or shared object, eg c:\winnt\system32\host.dll.
  3. "create or replace library host as 'c:\winnt\system32\host.dll';"
  4. "create or replace function host(command in varchar2) return pls_integer is external library host name "host" language c calling standard pascal parameters (host string, return long);"

Hope this helps.

Ciao,

Finn

Raymond K.W. Lau wrote:
>
> Oracle 8 has a new feature, External Procedure, for server-side PL/SQL.
> Does it mean that PL/SQL could now use OS or third party dynamic
> link libraries even its are not written specific for Oracle Server ?
>
> - Raymond
 

-- 
----------------------------------------------------------------------
 Ellebaek Consulting ApS         Finn Ellebaek Nielsen
 Niels Ebbesens Vej 9, 3. th.    Managing Director, Senior Consultant
 DK-1911  Frederiksberg C        ellebaek-consulting_at_post3.tele.dk
 Denmark                         +45 20 32 49 25
----------------------------------------------------------------------
                  "Where do you want to GPF today?"
Received on Sun Sep 06 1998 - 00:00:00 CEST

Original text of this message