Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Calling External Procedures on Oracle 8
Okay, sorry for replying to my own post but I think this may be of some use to others out there.
Theere were two problems:
Problem 1: When compiling the object, you need to create position independent
object code. This is done by specifying the +z option on HP UX 10.2. It
has to be compiled this way so that it can be put into a shared library.
eg cc -Aa +z test.c
Problem 2: As I suspected was creating the shared library. The correct command for HP Ux 10.2 is :
ld -b -o library_name object_file.
Keith Jamieson wrote:
I am trying to create an external procedure using Oracle 8 on hp-unix 10.2Received on Tue Mar 23 1999 - 07:11:55 CST
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 corrected session is as follows:
1) Create a c object file test.o using cc -Aa +z test.c
2) store it in a library ld -b -o 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
![]() |
![]() |