IsolationLevel IBM data server driver configuration keyword

Sets the default isolation level.

Equivalent CLI keyword
TxnIsolation
Equivalent IBM® data server provider for .NET connection string keyword
IsolationLevel
IBM data server driver configuration file (db2dsdriver.cfg) syntax
<parameter name="IsolationLevel" value="ReadUncommitted | ReadCommitted | RepeatableRead | Serializable | NoCommit | Transaction | 1 | 2 | 4 | 8 | 32"/>
Default setting:
2 or ReadCommitted (Cursor Stability)
Equivalent statement attribute:
SQL_ATTR_TXN_ISOLATION
Usage notes:
The IsolationLevel keyword can be set to one of the following levels:
1
The read uncommitted isolation level (uncommitted read).
2
The read committed isolation level (Cursor stability).
4
The Repeatable Read isolation level (Read Stability).
8
The serializable isolation level (Repeatable read).
32
The no commit isolation level. Only available for IBM Db2® for IBM i servers. This setting is similar to autocommit.

The words in parentheses are IBM terminology for the equivalent SQL92 isolation levels. The no commit isolation level is not an SQL92 isolation level and is supported only on IBM Db2 for IBM i servers.

The listed text values can also be used to set the IsolationLevel keyword in the IBM data server driver configuration file (db2dsdriver.cfg):
  • ReadUncommitted
  • ReadCommitted
  • RepeatableRead
  • Serializable
  • NoCommit
  • Transaction

For .NET applications only, you can indicate the Transaction text value. The value of the Transaction.Current.IsolationLevel property is mapped to the corresponding text value. For example, if the Transaction.Current.IsolationLevel property is set to the RepeatableRead enumeration, the IsolationLevel keyword is set to RepeatableRead.

If you use a text value that is not in the previous list, the value is ignored and the IsolationLevel keyword is set to the default value.

The IsolationLevel keyword is only applicable if the default isolation level is used. If the application explicitly sets the isolation level for a connection or statement handle, this keyword setting is ignored.