My Oracle Support Banner

10 Steps to Create and Run a Sample External Procedure Program on Unix (Doc ID 312564.1)

Last updated on NOVEMBER 27, 2023

Applies to:

PL/SQL - Version and later
Oracle Net Services - Version to [Release 8.1.7 to 11.2]
Information in this document applies to any platform.
Prerequisites: a C compiler (This note is written with Solaris, Linux, AIX, and HP compilers gcc and cc)

For AIX, the following packages or later need to be installed. If not, please have your Unix admin install them.
> rpm -qa | grep gcc


The goal of this document is to create a sample program that calls OS Commands from PL/SQL using extproc.

The Oracle demos for extproc depend on the generic <username> schema being installed as well as the sample "emp" and "dept" tables being created.  Most customers do not choose to utilize either option (or both) at install time thereby resulting in no efficient way to test extproc and its configuration.

The information provided in this note is a quick way of testing extproc (or extproc32) and should work with all versions of Oracle on any platform. 

Only steps 6 and 7 are Operating System specific. If you are using a different OS, it is your responsibility to find and correctly use a C compiler and a link editor.  See the note in step 6.



To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.