DB2 Version 9.7 for Linux, UNIX, and Windows

Setting the isolation level for an SQLJ transaction

To set the isolation level for a unit of work within an SQLJ program, use the SET TRANSACTION ISOLATION LEVEL clause.

The following table shows the values that you can specify in the SET TRANSACTION ISOLATION LEVEL clause and their data server equivalents.

Table 1. Equivalent SQLJ and data server isolation levels
SET TRANSACTION value Data server isolation level
SERIALIZABLE Repeatable read
REPEATABLE READ Read stability
READ COMMITTED Cursor stability
READ UNCOMMITTED Uncommitted read

The isolation level affects the underlying JDBC connection as well as the SQLJ connection.