SQL Guide : Managing transactions : Choosing transaction durability level : Setting transaction durability level
  
Setting transaction durability level
There are four ways to set the transaction durability level, described below in a descending order of precedence.
1 SET TRANSACTION DURABILITY – transaction-level setting
SET TRANSACTION DURABILITY { RELAXED | STRICT }
For example:
SET TRANSACTION DURABILITY STRICT;
The SET TRANSACTION DURABILITY command specifies the transaction durability for a transaction. You must issue the SET TRANSACTION DURABILITY command in the beginning of a statement. The durability setting applies only to the current transaction, until the transaction is committed or aborted.
2 SET DURABILITY – session-level setting
SET DURABILITY { RELAXED | STRICT }
For example:
SET DURABILITY STRICT;
The SET DURABILITY command specifies the transaction durability for a session. A session is the time between connecting and disconnecting to the server. Each user has a separate session, even if the sessions overlap in time. (A single user may establish more than one session, for example, by running multiple copies of solsql, or by writing a program that makes multiple connections to the same server). When you use the SET DURABILITY statement, you specify the transaction durability only for the session in which the command is issued. Your choice will not affect any other user, any other open session that you yourself currently have, or any future session that you may have. Each user session may set its own transaction durability level, based on how important it is for the session not to lose any data.
The effect of this statement lasts until the end of the session, or until another SET DURABILITY command is issued.
3 Logging.DurabilityLevel - server default setting
[Loggsing] DurabilityLevel=3
The parameter setting affects all users.
The Logging.DurabilityLevel parameter can be changed dynamically. If you want to change the default setting while the server is running, issue the following command:
ADMIN COMMAND ’parameter Logging.DurabilityLevel={1 | 2 | 3}’
The command is effective immediately.
4 Logging.DurabilityLevel - factory value for server
If you do not set the transaction durability level using any of the methods above, the server will use relaxed durability
(Logging.DurabilityLevel=1).
See also
Choosing transaction durability level