TRANSACTION
SET TRANSACTION 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.
Last modified date: 08/28/2024