Use the SET TRANSACTION ISOLATION LEVEL command to set the transaction characteristics of the current session.
SET TRANSACTION ISOLATION LEVEL { READ WRITE | READ ONLY | SERIALIZABLE }
Input | Description |
---|---|
READ WRITE | Allows a user to read and update a database. This is the default. |
READ ONLY | During the session, a user can read from a database but not write to it. If the user attempts to write to the database, the system returns an error code. The user can create and write to temporary tables. |
SERIALIZABLE | The isolation level of a transaction determines what data that transaction can see when other transactions are running concurrently. When the isolation level is serializable, the current transaction can see only rows that are committed before the first query or data-modification statement is started in this transaction. Consequently, two concurrent transactions leave the database in the same state that they would if the two transactions ran one after the other in either order. |
Output | Description |
---|---|
SET VARIABLE | The command was successful. |
You must be an administrator, or you must be able to connect to the database and schema.
MYDB.SCH1(USER)=> SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
SET VARIABLE