Name

SET TRANSACTION

Synopsis

SET TRANSACTION
    [READ ONLY]
    [READ WRITE]
    [ISOLATION LEVEL [SERIALIZABLE | READ COMMITTED] ]
    [USE ROLLBACK SEGMENT seg_name]

Establishes the current transaction as read only or read and write, or specifies the rollback segment to be used by the transaction.

Keywords

READ ONLY

Specifies that the current transaction is read only.

READ WRITE

Specifies that the current transaction is read and write.

ISOLATION_LEVEL

Specifies how Oracle should conform to the ANSI SQL92 Serializable Transaction specification for the transaction; you may specify:

SERIALIZABLE

Specifies that Oracle should conform to the ANSI SQL92 Serializable Transaction specification and roll back transactions that attempt to update rows being updated by another transaction.

READ COMMITTED

Specifies that Oracle should continue to use its default processing and wait for the rows to be unlocked before continuing.

USE ROLLBACK SEGMENT

Assigns this transaction to a specified rollback segment. This clause implies READ WRITE, and cannot be specified with READ ONLY.

Note

If used, this statement must be the first statement of your transaction. A transaction is ended with a COMMIT or COMMIT WORK statement.

Example

The following example specifies a rollback segment and performs an update transaction:

SET TRANSACTION
   USE ROLLBACK SEGMENT rbs99
/
UPDATE emp
SET SAL = SAL*1.1
/
COMMIT
/
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset