ALLBASE/SQL Reference Manual (36216-90216)
Chapter 12 543
SQL Statements S - Z
SET TRANSACTION
RC Read Committed. Means that your transaction uses locking strategies to
ensure that you retrieve only rows that have been committed by some
transaction.
RU Read Uncommitted. Means that the transaction reads data without
obtaining additional locks.
REPEATABLE READ Same as RR.
SERIALIZABLE Same as RR.
CURSOR STABILITY Same as CS.
READ COMMITTED Same as RC.
READ UNCOMMITTED Same as RU.
HostVariable1
is a string host variable containing one of the isolation level
specifications above.
Priority
is an integer from 0 to 255 specifying the priority of the transaction.
Priority 127 is the default. ALLBASE/SQL uses the priority to resolve a
deadlock. The transaction with the largest priority number is aborted to
remove the deadlock.
For example, if a priority-0 transaction and a priority-1 transaction are
deadlocked, the priority-1 transaction is aborted. If two transactions
involved in a deadlock have the same priority, the deadlock is resolved by
aborting the newer transaction (the last transaction begun, either
implicitly or with a BEGIN WORK statement).
HostVariable2
is an integer host variable containing the priority specification.
LabelString
is a user defined character string of up to 8 characters. The default is a
blank string.
The label is visible in the SYSTEM.TRANSACTION pseudo-table and also
in SQLMON. Transaction labels can be useful for troubleshooting and
performance tuning. Each transaction in an application program can be
marked uniquely, allowing the DBA to easily identify the transaction being
executed by any user at any moment.
Labels for a new transaction can be specified with the BEGIN WORK, SET
TRANSACTION, and SET SESSION statements. SET TRANSACTION can also be
used to change the existing label of an active transaction. If a transaction
consists of multiple queries and unique labels are set between each query,
a DBA can identify the actual query being executed by an active
transaction.
HostVariable3
is a string host variable containing the
LabelString
.
ConstraintType
identifies the types of constraints that are affected by the DEFERRED
and IMMEDIATE options. Each
ConstraintType
can be one of the
following:
UNIQUE
REFERENTIAL
CHECK