|Oracle® Database Administrator's Guide
11g Release 2 (11.2)
Part Number E17120-05
This section contains:
External procedures are procedures that are written in C, C++, Java, or other language, compiled and stored outside the database, and then called by user sessions. For example, a PL/SQL program unit could call one or more C routines that are required to perform special-purpose processing.
These callable routines are stored in a dynamic link library (DLL), or a libunit in the case of a Java class method, and are registered with the base language. Oracle Database provides a special-purpose interface, the call specification (call spec), that enables users to call external procedures in other languages.
When a user session calls an external procedure, the database starts an external procedure agent on the database host computer. The default name of the agent is
extproc. Each session has its own dedicated agent. When a session terminates, the database terminates its agent.
User applications pass to the external procedure agent the name of the DLL or libunit, the name of the external procedure, and any relevant parameters. The external procedure agent then loads the DLL or libunit, runs the external procedure, and passes back to the application any values returned by the external procedure.
See Also:Oracle Database Advanced Application Developer's Guide for information about external procedures
Enabling external procedure calls may involve the following DBA tasks:
Configuring the listener to start the
By default, the database starts the
extproc process. Under the following circumstances, you must change this default configuration so that the listener starts the
You want to use a multithreaded
The database is running in shared server mode on Windows
AGENT clause in the
LIBRARY specification or an
IN clause in the
FUNCTION specification redirects external procedures to a different
Instructions for changing the default configuration are found in the subsection entitled "Set Up the Environment" in the chapter "Developing Applications with Multiple Programming Languages" in Oracle Database Advanced Application Developer's Guide.
Creating libraries or granting
The database requires DLLs to be accessed through a schema object called a library. For security purposes, by default, only users with the
DBA role can create and manage libraries. Therefore, you may be asked to:
LIBRARY statement to create the library objects that the developers need.
LIBRARY privileges to developers.
See Also:Oracle Database PL/SQL Language Reference for information about the