User`s guide

11
External Procedures 11-1
11
External Procedures
This chapter describes how to create an environment on BS2000/OSD, where external
procedure calls can operate. It complements the chapter about External Routines in the
Fundamentals section of Oracle Database Advanced Application Developer's Guide.
11.1 Loading External Procedures
This section complements the corresponding part in Oracle Database Advanced
Application Developer's Guide.
Follow these steps to load external procedures:
1. Set up the environment.
An external procedure does not run in the same process and address space as the
caller. Oracle creates separate processes for them to operate in a safe and secure
manner. For this purpose Oracle Net Services features are used and it is the
responsibility of the user to provide appropriate Oracle Net Services parameter
files. In this section, we have documented an example of how it can work. For
more information, refer to Oracle Database Advanced Application Developer's Guide,
Oracle Database Data Cartridge Developer's Guide, and Oracle Database Net Services
documentation set.
The
listener.ora
file should have the following entry:
(SID_DESC = (SID_NAME = ep_agt1)
(ENVS = EXTPROC_DLLS=ANY)
(ORACLE_SID = sid_of_your_database)
(PROGRAM = EXTPROC)
)
The
tnsnames.ora
file should have the following entry:
extproc_connection_data = (DESCRIPTION =(ADDRESS =(PROTOCOL=ipc)
(KEY = sid_of_your_database)(CONNECT_DATA =(PRESENTATION=RO)
(SID = ep_agt1)))
Then you can start a listener.
2. Identify the 'DLL'.
A DLL in the BS2000 environment is a BS2000 LMS library containing the
functions called as external procedures. When
EXTPROC
is loaded these functions
are dynamically bound to the program.
Use the following command to identify your library to Oracle:
CREATE LIBRARY my_c_library AS '$myuserid.my-modlib';