Skip to Main Content
Oracle in a Nutshell
book

Oracle in a Nutshell

by Rick Greenwald, David C. Kreines
December 2002
Intermediate to advanced content levelIntermediate to advanced
928 pages
85h 29m
English
O'Reilly Media, Inc.
Content preview from Oracle in a Nutshell

SET TRANSACTION

SET TRANSACTION trans_type  NAME name

Controls the type of transaction.

Keyword

trans_type

Can be one of these values:

READ ONLY

Marks the beginning of a read-only transaction. Tells the RDBMS to enforce a read-consistent view of the database for the transaction (the default is for the statement). The transaction is ended with either a COMMIT or a ROLLBACK. Only LOCK TABLE, SELECT, SELECT INTO, OPEN, FETCH, CLOSE, COMMIT, and ROLLBACK statements are permitted during a read-only transaction. Issuing other statements, such as INSERT or UPDATE, in a read-only transaction results in an ORA-1456 error.

READ WRITE

Marks the beginning of a READ WRITE transaction; this is the default.

ISOLATION LEVEL SERIALIZABLE

Similar to a READ ONLY transaction in that transaction-level read consistency is enforced instead of the default statement-level read consistency. Serializable transactions do allow changes to data. For more information about isolation levels, see Chapter 3.

ISOLATION LEVEL READ COMMITTED

If the transaction requires rows that are locked by other transactions, will wait.

USE ROLLBACK SEGMENT rbseg_name

Tells the RDBMS to use the specifically named rollback segment rbseg_name. Useful when only one rollback segment is large and a program knows that it needs to use the large rollback segment, such as during a month-end close operation.

name

Name for the transaction, which is available for the duration of the transaction.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Oracle Internals

Oracle Internals

Donald K. Burleson
Oracle PL/SQL

Oracle PL/SQL

Lewis Cunningham
Oracle Essentials: Oracle9i, Oracle8i and Oracle8, Second Edition

Oracle Essentials: Oracle9i, Oracle8i and Oracle8, Second Edition

Rick Greenwald, Robert Stackowiak, Jonathan Stern

Publisher Resources

ISBN: 0596003366Errata Page