Databases Reference
In-Depth Information
Figure 7.1
EXTPROC
invocation process.
In the example shown, the functions are in an external library that needs
to be available to the server. In order for such an external function to be
available, you have to register the shared library with PL/SQL. You tell PL/
SQL about the library using the LIBRARY clause in the EXTERNAL defi-
nition. The actual loading of the library happens through a session-specific
agent called EXTPROC that is invoked through the listener. As shown in
Figure 7.1, when the wrapper is called, PL/SQL calls the listener process,
which spawns EXTPROC. The shared library is loaded in an external
address space and the call to the function is performed. The reply then
comes back through EXTPROC, which keeps running to serve up addi-
tional calls so that loading overhead occurs only once.
Because the invocation process is initiated through the listener, the lis-
tener configuration would typically have the following entry in
listener.ora :
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oracle\product10g\10.1.0\Db_1)
(PROGRAM = extproc)
)
)
and the following in tnsnames.ora :
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(KEY = EXTPROC))
)
 
Search WWH ::




Custom Search