SQL$HELP72.HLB  —  ALTER  PROCEDURE  Arguments

1  –  bind-site-clause

    Syntax options:

    BIND ON CLIENT SITE | BIND ON SERVER SITE

    Selects the execution model and environment for external routine
    execution.

    CLIENT site binding causes the external routine to be activated
    and executed in the OpenVMS database client (application)
    process. This is the default binding. This binding offers
    the most efficient execution characteristics, allows sharing
    resources such as I/O devices, and allows debugging of external
    routines as if they were part of the client application. However,
    this binding may suffer from address space limitations. Because
    it shares virtual memory with the database buffers, this binding
    is restricted to the client process system user environment, and
    prohibits external routine execution in cases of an application
    running with elevated privileges.

    SERVER site binding causes the external routine to be activated
    in a separate process from the database client and server. The
    process is started on the same node at the database process.
    This binding offers reasonable execution characteristics, a
    larger address space, a true session user environment, and has
    no restrictions regarding client process elevated privileges.
    However, this binding does not permit sharing resources such
    as I/O devices with the client (in particular, there is no
    connection to the client interactive terminal), and debugging
    of routines is generally not possible.

2  –  bind-scope-clause

    Syntax options:

    BIND SCOPE CONNECT | BIND SCOPE TRANSACTION

    Defines the scope during which an external routine is activated
    and at what point the external routine is deactivated. The
    default scope is CONNECT.

    o  CONNECT

       An active routine is deactivated when you detach from the
       database (or exit without detaching).

    o  TRANSACTION

       An active routine is deactivated when a transaction is
       terminated (COMMIT or ROLLBACK). In the event that a
       transaction never occurs, the scope reverts to CONNECT.

3  –  COMMENT IS string

    Adds a comment about the procedure. SQL displays the text of the
    comment when it executes a SHOW PROCEDURES statement. Enclose the
    comment in single quotation marks (') and separate multiple lines
    in a comment with a slash mark (/).

    This clause is equivalent to the COMMENT ON PROCEDURE statement.

4  –  COMPILE

    The COMPILE option forces the Oracle Rdb server to recompile the
    stored (SQL) procedure. External procedures are not affected.

    Use COMPILE when a procedure has been made invalid by the
    execution of a DROP . . . CASCADE operation. This mechanism is
    preferred over the SET FLAGS 'VALIDATE_ROUTINE' method available
    in previous versions.

5  –  external-body-clause

    Identifies key characteristics of the routine: its name, where
    the executable image of the routine is located, the language in
    which the routine is coded, and so forth.

6  –  external-body-name

    The name of the external routine. If you do not specify a name,
    SQL uses the name you specify in the external-routine-name
    clause.

    This name defines the routine entry address that is called for
    each invocation of the routine body. The named routine must exist
    in the external routine image selected by the location clause.

    Unquoted names are converted to uppercase characters.

7  –  external-location-clause

    Syntax options:

       DEFAULT LOCATION
       LOCATION 'image-location'

    A default or specific location for the external routine image.
    The resulting file specification must include the type .exe.

    This can be an image file specification or merely a logical name.

    SQL selects a routine based on a combination of factors:

    o  Image string

       The location defaults to DEFAULT LOCATION, which represents
       the file specification string RDB$ROUTINES.

    o  Logical name translation

       The WITH ALL LOGICAL_NAME TRANSLATION and the WITH SYSTEM
       LOGICAL_NAME TRANSLATION clauses specify how logical names in
       the location string are to be translated.

       If no translation option is specified, or if WITH ALL LOGICAL_
       NAME TRANSLATION is specified, logical names are translated in
       the default manner.

       If WITH SYSTEM LOGICAL_NAME TRANSLATION is specified, any
       logical names in the location string are expanded using only
       EXECUTIVE_MODE logical names from the SYSTEM logical name
       table.

8  –  LANGUAGE language-name

    The name of the host language in which the external routine
    was coded. You can specify ADA, C, COBOL, FORTRAN, PASCAL, or
    GENERAL. The GENERAL keyword allows you to call routines written
    in any language.

9  –  notify-clause

    Specifies the name of a second external routine called (notified)
    when certain external routine or database-related events occur.
    This name defines the routine entry address that is called, for
    each invocation of the notify routine. The named routine must
    exist in the external routine image selected by the location
    clause.

    The events of interest to the notify routine are ON BIND, ON
    CONNECT, and ON TRANSACTION. Multiple events can be specified.

    The following describes the events and scope of each event:

         BIND        Routine activation to routine deactivation
         CONNECT     Database attach to database disconnect
         TRANSACTION Start transaction to commit or roll back
                     transaction

10  –  RENAME_TO

    Changes the name of the procedure being altered. See the RENAME
    for further discussion. If the new name is the name of a synonym
    then an error will be raised.
Close Help