User-Defined And System-Defined Transactions; User-Defined Transactions; System-Defined Transactions; Rules For Dml Statements - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

User-Defined and System-Defined Transactions

User-Defined Transactions

Transactions you define are called user-defined transactions. To ensure that a sequence of statements
executes successfully or not at all, you can define one transaction consisting of these statements
by using the BEGIN WORK Statement and COMMIT WORK Statement. You can abort a
transaction by using the ROLLBACK WORK Statement.

System-Defined Transactions

In some cases, Neoview SQL defines transactions for you. These transactions are called
system-defined transactions. Most DML statements initiate transactions implicitly at the start of
execution. See Implicit
transaction is initiated implicitly, you must end a transaction explicitly with the COMMIT WORK
statement or the ROLLBACK WORK statement.

Rules for DML Statements

If deadlock occurs, the DML statement times out and receives an error.

Effect of AUTOCOMMIT Option

AUTOCOMMIT is an option that can be set in a SET TRANSACTION statement. It specifies
whether Neoview SQL will commit automatically, or roll back if an error occurs, at the end of
statement execution. This option applies to any statement for which the system initiates a
transaction. See SET TRANSACTION
If this option is set to ON, Neoview SQL automatically commits any changes, or rolls back any
changes, made to the database at the end of statement execution.

Concurrency

Concurrency is defined by two or more processes accessing the same data at the same time. The
degree of concurrency available—whether a process that requests access to data that is already
being accessed is given access or placed in a wait queue—depends on the purpose of the access
mode (read or update) and the isolation level.
Neoview SQL provides concurrent database access for most operations and controls database
access through the mechanism for locking and the mechanism for opening and closing tables.
For DML operations, access and locking options affect the degree of concurrency. See
Consistency and Access Options" (page
"SET TRANSACTION Statement" (page
The following tables describe interactions between SQL operations.
Table 1-1
compares operations with access modes and lists DDL and Utility operations you can
start while DML operations are in progress.
Table 1-1 Concurrent DDL/Utility Operation and File Access Modes
DDL Operations You Can
Start
ALTER TABLE attributes
1
DDL operation aborts the DML operation.
Table 1-2
compares DDL and utility operations with DML operations and shows DDL operations
you can start while DML operations are in progress:
Transactions"Implicit Transactions" (page
Statement"SET TRANSACTION Statement" (page
30),
"Database Integrity and Locking" (page
166).
READ UNCOMMITTED
1
Allowed
167). However, even if a
Access Mode
READ COMMITTED
1
Allowed
Transaction Management
166).
"Data
31), and
SERIALIZABLE
Waits
33

Advertisement

Table of Contents
loading

Table of Contents