Isolation levels

With the exception of the no commit isolation level, all Db2 isolation levels have corresponding ODBC isolation levels.

The following table maps Db2 isolation levels to ODBC transaction isolation levels. The SQLGetInfo() function indicates which isolation levels are available.

Table 1. Isolation levels under ODBC
Db2 isolation level ODBC isolation level
Cursor stability SQL_TXN_READ_COMMITTED
Repeatable read SQL_TXN_SERIALIZABLE_READ
Read stability SQL_TXN_REPEATABLE_READ
Uncommitted read SQL_TXN_READ_UNCOMMITTED
No commit (no equivalent in ODBC)

Restriction: SQLSetConnectAttr() and SQLSetStmtAttr() return SQL_ERROR with an SQLSTATE of HY009 if you try to set an unsupported isolation level.