8. SQL Statements : SET : Transaction Access Mode
 
Share this page                  
Transaction Access Mode
The SET TRANSACTION access mode controls the access mode for the current transaction.
The SET TRANSACTION statement must be issued before a transaction commences and the settings last only until that transaction is completed.
The access mode options are as follows:
READ ONLY
When a transaction access mode of READ ONLY is specified, insert, update, delete, copy, and DDL operations are disallowed, and an SQLSTATE of 25000 (invalid session state) is returned. Temporary tables are the exception and are always writable.
When a READ ONLY transaction is begun, it registers itself with the logging system and is allowed to proceed even when a ckpdb is pending against the database for the session.
READ WRITE
If READ WRITE is specified, the level of isolation can be READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, or SERIALIZABLE.
Note:  The access mode of a transaction has no effect on the locking mode of the transaction.