Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

More Information

tx options

db txns

More Information

More Options

More Information

RDB/VMS SQL SET_TRANSACTION — VMS SQLdev_2.0

 SET TRANSACTION --+---------------+-> ;
                   +-> tx-options -+
                   +-> db-txns ----+

Additional information available:

More Informationtx optionsdb txns

More Information

 SET TRANSACTION is an executable statement that both starts a
 transaction and specifies its characteristics.  A transaction is
 a group of statements whose changes can be made permanent or
 undone as a unit.  The characteristics specified in a SET
 TRANSACTION statement affect all transactions until the
 transaction ends with a COMMIT or ROLLBACK statement.

 SET TRANSACTION differs from DECLARE TRANSACTION in two ways:

 1.  SET TRANSACTION is an executable statement, so the
     transaction characteristics it specifies take effect when
     you issue it.

 2.  The transaction characteristics specified in SET TRANSACTION
     last only until the next COMMIT or ROLLBACK statement.  The
     characteristics specified by a DECLARE TRANSACTION statement
     are valid until you enter another DECLARE TRANSACTION
     statement.  (A COMMIT or ROLLBACK statement followed by a
     SET TRANSACTION statement may start a transaction with
     different characteristics, but subsequent transactions
     started implicitly will have the characteristics specified
     in the last DECLARE TRANSACTION statement.)

 You can include multiple SET TRANSACTION statements in a host
 language source file or in an SQL language module, providing
 flexibility for changing transaction characteristics in a
 program source file.

tx options

 tx-options =

  -+---> BATCH UPDATE ----------->------------------------+--->
   +-+------------------+-+------>-----+--+               |
     +-> READ ONLY    --+ +-> WAIT ----+  |               |
     +-> READ WRITE   --+ +-> NOWAIT --+  |               |
     +------------------------------------+               |
     +-+-------------------->---------+---+               |
       +-> CONSISTENCY LEVEL -+-> 2 --+   |               |
                              +-> 3 --+   |               |
     +------------------------------------+               |
     +-+----------------->-----------------------+-+      |
       +-> EVALUATING -+-> evaluating-clause --+-+ |      |
                       +-------- , <-----------+   |      |
     +---------------------------------------------+      |
     +-+----------------->-----------------------+----->--+
       +-> RESERVING --+-> reserving-clause ---+-+
                       +-------- , <-----------+

Additional information available:

More Information

More Information

 The transaction options include:

  o  BATCH UPDATE to reduce overhead in large load operations by
     not writing to any journal files.  No rollback is possible
     for batch update transactions.

  o  READ ONLY or READ WRITE specifies whether you want to use a
     snapshot of the database for only reading records or use a
     locking mechanism of SQL to get consistency in data
     retrieval and update for reading and writing records.

  o  WAIT or NOWAIT determines what your transaction does when it
     encounters a locked record.  WAIT waits for other
     transactions to complete and then proceds.  NOWAIT returns
     an error message when it encounters a locked record.

  o  See More_Options for additional transaction options.

Additional information available:

More Options

More Options

  o  CONSISTENCY LEVEL determines the extent to which the
     database protects the consistency of your data.
     Relationships between data items may not be preserved by
     LEVEL 2 transactions since data items can be updated by
     another transaction before the LEVEL 2 transaction finishes.
     LEVEL 3 transactions mean the database system guarantees
     that data you read will not be changed by another user
     before you issue a COMMIT statement.

  o  EVALUATING determines the point at which the named
     constraint(s) are evaluated.  If you specify VERB TIME, they
     are evaluated when the data manipulation statement is
     issued.  If you specify COMMIT TIME, they are evaluated when
     the COMMIT statement executes.  For READ ONLY transactions,
     this clause is allowed but meaningless.

  o  RESERVING specifies the list of tables to be locked during
     the transaction.

db txns

 db-txns =
  -+--------------------------------------------------------------+->
   ++-> ON -+-> auth-id -+-> USING --> (-+-> tx-options --+-> ) -++
    |       +---- , <----+               +-> DEFAULTS ----+      |
    +-------------------------- AND <----------------------------+

Additional information available:

More Information

More Information

 Specifies the options for accessing other schemas when using the
 SET TRANSACTION statement.  These options include the
 authorization identifier for the schema and whether you want to
 state the transaction options individually or accept the default
 transaction options of READ WRITE WAIT plus the consistency
 option appropriate for the database system you are using.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026