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

Home -> Community -> Usenet -> c.d.o.tools -> Re: external procedures

Re: external procedures

From: <yitbsal_at_statcan.ca>
Date: 2000/05/30
Message-ID: <8h0rlg$h8c$1@nnrp1.deja.com>#1/1

In article <4izX4.2179$qS3.5730_at_tor-nn1.netcom.ca>,   "willy11" <dwillard_at_attcanada.com> wrote:
> Hi,
> I am trying to call a c function from within pl/sql and I am
 getting the
> errors:
> 1. ORA-6521 PL/SQL: Error Mapping function and
> 2. ORA-6522 ld.so.1:
> /u01/oracle/product/8.1.6/bin/extproccallout :fatal: call_ext_fn:
 can't find
> symbol
> where 'call_ext_fn' is the c funtion I am trying to call. This
 function
> takes a string as its parameter and returns an integer. I have
 registered
> the funtion as follows:
>
> create or replace function call_ext_fn(msg in out varchar2) return
> binary_integer is
> external
> library MQEXTLIB
> name "call_ext_fn"
> parameters( msg string, return int);
>
> If anyone can help in explaining what I am doing wrong it would be
 much
> appreciated
>

As the previous replier said, external procedures have all sorts of peculiar problems on various platforms. From my experience with external procedures, I've learned the following:

  1. Ensure all directories that the extproc depends on are readable, writable and executable by the oracle operating system account.
  2. Compile the external procedure in exactly the same way as suggested in the Oracle doc, or in the book Oracle PL/SQL Programming. Make sure that the Oracle libraries referenced in the compile exist in the specified locations.
  3. In general, follow the steps required to create external procedures that are listed in the Oracle doc.
  4. Ensure the code in the library actually works by executing it, or some variant of it, from the operating system.

I can't think of any other rules offhand, but I would suggest you read other postings about external procedures in the comp.databases.oracle archives.

Salaam Yitbarek

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue May 30 2000 - 00:00:00 CDT

Original text of this message

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