My Oracle Support Banner

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

Last updated on FEBRUARY 04, 2022

Applies to:

PL/SQL - Version 9.0.1.0 and later
Oracle Net Services - Version 8.1.7.4.0 to 11.2.0.2 [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
gcc-4.0.0-1
libgcc-4.0.0-1
gcc-c++-4.0.0-1


Goal

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.

 

Solution

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
Goal
Solution

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