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

Home -> Community -> Usenet -> c.d.o.misc -> Calling External Procedures on Oracle 8

Calling External Procedures on Oracle 8

From: Keith Jamieson <pdkj02_at_email.mot.com>
Date: Thu, 18 Mar 1999 15:37:36 +0000
Message-ID: <36F11DC0.8C1DF5FB@email.mot.com>


I am trying to create an external procedure using Oracle 8 on hp-unix 10.2

I have successfully created and registered an external library.
I have also successfully defined a procedure to call the External library.

I am trying to execute the procedure using Sqlplus
 
 

I did start the extproc process, but this didn't make any difference.

The entire session was as follows:

1) Create a  c object file test.o using cc -Aa test.c
2) store it in a library ar -r test_lib.so test.o
3) enter Sqlplus
4) create library LIB as '/home/keithj/test_lib.so';
5) create or replace procedure test as EXTERNAL
LIBRARY LIB
NAME "test"
LANGUAGE C;

6) exec test
 
After step 6 I receive the following error messages:
ERROR at line 1:

ORA-06520: PL/SQL: Error loading external library
ORA-06522: Exec format error
ORA-06512: at schema_name.procedure_name, line 0
ORA-06512: at line 1

The c object is insignificant in that all it does is execute a printf statement.
I include it here for completeness.

void test(void);
#include <stdio.h>
void test(void)
{
     printf("Hello Keith\n");
}

I suspect that I have not created the shared library properly. Please can someone tell me where I have gone wrong.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  Received on Thu Mar 18 1999 - 09:37:36 CST

Original text of this message

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