Skip Headers
Oracle® Database Installation and Administration Guide
10g Release 2 (10.2) for Fujitsu Siemens BS2000/OSD

Part Number E10319-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

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 Application Developer's Guide - Fundamentals.

Loading External Procedures

This section complements the corresponding part in Oracle Database Application Developer's Guide - Fundamentals.

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 suitable Oracle Net Services control files. In this section, we have documented an example of how it can work. For more information, refer to Oracle Database Application Developer's Guide - Fundamentals, 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 modlib 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';
    

    The external C routine has to be compiled and the generated LLM has to be stored in the modlib. Note that if you set the MODULE-PROPERTIES option LOWER-CASE-NAMES=*NO, all lowercase letters in the entry names are converted to uppercase.

    Furthermore, note that if you set the MODULE-PROPERTIES option SPECIAL-CHARACTERS=*CONVERT-TO-DOLLAR, all underscores (_) in entry names are converted to dollar signs ($), which must be considered when publishing the external procedure.

  3. Publishing and running external procedures does not differ from the description in Oracle Database Application Developer's Guide - Fundamentals. Result messages about the execution of the external procedure can be found in a file named L.sid.EXTP.SYSOUT.tsn.