IBM Data Server Driver for JDBC and SQLJ isolation levels
The IBM Data Server Driver for JDBC and SQLJ supports a number of isolation levels, which correspond to database server isolation levels.
JDBC isolation levels can be set for a unit of work within a JDBC program, using the Connection.setTransactionIsolation method. The default isolation level can be set with the defaultIsolationLevel property.
The following table shows the values of level that you can specify in the Connection.setTransactionIsolation method and their Db2 database server equivalents.
JDBC value | Db2 isolation level |
---|---|
java.sql.Connection.TRANSACTION_SERIALIZABLE | Repeatable read |
java.sql.Connection.TRANSACTION_REPEATABLE_READ | Read stability |
java.sql.Connection.TRANSACTION_READ_COMMITTED | Cursor stability |
java.sql.Connection.TRANSACTION_READ_UNCOMMITTED | Uncommitted read |
The following table shows the values of level that you can specify in the Connection.setTransactionIsolation method and their IBM Informix® equivalents.
JDBC value | IBM Informix isolation level |
---|---|
java.sql.Connection.TRANSACTION_SERIALIZABLE | Repeatable read |
java.sql.Connection.TRANSACTION_REPEATABLE_READ | Repeatable read |
java.sql.Connection.TRANSACTION_READ_COMMITTED | Committed read |
java.sql.Connection.TRANSACTION_READ_UNCOMMITTED | Dirty read |
com.ibm.db2.jcc.DB2Connection.TRANSACTION_IDS_CURSOR_STABILITY | IBM Informix cursor stability |
com.ibm.db2.jcc.DB2Connection.TRANSACTION_IDS_LAST_COMMITTED | Committed read, last committed |