ALLBASE/SQL Reference Manual (36216-90216)

88 Chapter2
Using ALLBASE/SQL
Managing Transactions
statement issued within a transaction has no effect on the present transaction, instead it
takes effect for the next transaction and remains in effect for the duration of the session,
unless reset by a subsequent BEGIN WORK, SET TRANSACTION, SET CONSTRAINTS, SET
DML ATOMICITY, or SET SESSION statement.
Outside of a transaction, the attributes specified in a SET TRANSACTION or SET SESSION
statement take effect for the next transaction, unless subsequently reset by such a
statement or by a BEGIN WORK statement. The SET TRANSACTION, SET CONSTRAINTS, and
SET DML ATOMICITY statements remain in effect for the duration of the transaction, unless
subsequently reset. The SET SESSION statement remains in effect for the duration of the
session, unless subsequently reset.
Table 2-1. shows these statements, the attributes associated with each, when each
statement goes into effect after being issued and the scope of each statement's attributes if
not reset by a subsequent statement:
For example, you might write an application containing several transactions. Each
transaction contains one or more SELECT statements. You want to ensure that all data
Table 2-1. Transaction Attribute Scope
Statement Attributes When Effective Duration of
Attribute
Setting
Begins a
Transaction if
None Already
Begun
SET SESSION
a
a. Note that SET SESSION issued within a transaction is
not
savepoint sensitive.
isolation level
priority
label
constraint checking
mode
DML atomicity level
fill option
for the next
transaction
until the
session ends
no
SET
TRANSACTION
isolation level
priority
label
constraint checking
mode
DML atomicity level
for the next or
current
transaction
until the
transaction
ends
no
SET
CONSTRAINTS
constraint checking
mode
for the current
transaction
until the
transaction
ends
yes
SET DML
ATOMICITY
DML atomicity level for the current
transaction
until the
transaction
ends
yes
BEGIN WORK isolation level
priority
label
fill option
when the
transaction
begins
until the
transaction
ends
yes