SET commands apply to the user session (connection) in which they are executed. They do not affect other user sessions.
SET statements may be issued at any time; however, they do not all take effect immediately. The following statements take effect immediately:
▪SET CATALOG
▪SET IDLE TIMEOUT
▪SET LOCK TIMEOUT
▪SET OPTIMISTIC LOCK TIMEOUT
▪SET SCHEMA
▪SET STATEMENT MAXTIME
The following statements take effect after the next COMMIT WORK:
▪SET DURABILITY
▪SET ISOLATION LEVEL
▪SET { READ ONLY | READ WRITE | WRITE}
SET statements are not subject to rollback; they remain in force even if the transaction they have been issued in has been aborted or rolled back. It is a good practice to issue them before any DDL/DML SQL statement in a transaction.
The settings continue in effect until the end of the session (connection) or until another SET command changes the settings, or in some cases until a higher-precedence command (for example, SET TRANSACTION) is executed.