SQL$HELP72.HLB  —  Context Structures
    A distributed transaction groups more than one database or more
    than one database attachment together into one transaction, even
    if the databases are located on different nodes. The Oracle Rdb7
    Guide to Distributed Transactions explains how to use Oracle Rdb
    with distributed transactions.

    The two-phase commit protocol coordinates the activity of
    participants in a transaction to ensure that every required
    operation is completed before a transaction is made permanent,
    even if the transaction is a distributed transaction.

    You can use the two-phase commit protocol when the DECdtm
    transaction manager software is installed and started on all
    nodes that are in the transaction. Use the two-phase commit
    protocol when your application starts a distributed transaction.

    When you declare a context structure in an application, you must
    associate it with most executable SQL statements. This is true
    whether you use SQL module language or precompiled SQL, although
    the method you use to associate the context structure with SQL
    statements differs depending upon which compiler you choose.

    However, you cannot associate a context structure with the
    following categories of executable statements:

    o  Statements that you cannot execute when a transaction is
       already started

    o  Statements that do not execute within the scope of a
       transaction and are independent of any transaction context

    o  Statements that you cannot use in transactions that were
       started by explicit calls to the transaction manager

    You must use the USING CONTEXT clause to specify that an
    embedded SQL statement is part of a distributed transaction.
    For more information about using embedded SQL with distributed
    transactions, see the Oracle Rdb SQL Reference Manual. You
    must use the CONTEXT clause in a module language procedure to
    make SQL execute your procedure in the context of a distributed
    transaction. For more information about using SQL module language
    with distributed transactions, see the Oracle Rdb SQL Reference
    Manual.

    The following restrictions apply when passing context structures:

    o  You cannot pass a context structure to the following SQL
       statements because you cannot execute them when a transaction
       is already started:

       -  ALTER DATABASE

       -  CREATE DATABASE

       -  DROP PATHNAME

       -  DROP DATABASE

    o  You cannot pass a context structure to the following SQL
       statements because they do not execute within the scope of
       a transaction, and they are independent of any transaction
       context:

       -  CONNECT

       -  DESCRIBE

       -  DISCONNECT

       -  Extended Dynamic DECLARE CURSOR

       -  RELEASE

       -  SET CATALOG

       -  SET CHARACTER LENGTH

       -  SET CONNECT

       -  SET DEFAULT CHARACTER SET

       -  SET DEFAULT DATE FORMAT

       -  SET DIALECT

       -  SET IDENTIFIER CHARACTER SET

       -  SET KEYWORD RULES

       -  SET LITERAL CHARACTER SET

       -  SET NAMES

       -  SET NATIONAL CHARACTER SET

       -  SET OPTIMIZATION LEVEL

       -  SET QUOTING RULES

       -  SET SCHEMA

       -  SET VIEW UPDATE RULES

    o  You cannot pass a context structure to the following SQL
       statements because they have been started by explicit calls
       to the transaction manager:

       -  COMMIT

       -  ROLLBACK

       (The DISCONNECT statement can be considered in this category
       as well as the previous category.)

    Remember that you cannot associate a context structure with
    nonexecutable SQL statements. Moreover, you cannot pass a
    context structure to a multistatement procedure if that procedure
    contains a SET TRANSACTION, COMMIT, or ROLLBACK statement.
Close Help