Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Calling External Procedures on Oracle 8
I am trying to create an external procedure using Oracle 8 on hp-unix 10.2
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
![]() |
![]() |