Isolation Levels

Restriction: This topic applies to Windows environments only.

The isolation level in effect determines the manner in which locks are acquired and released by the system. The XDB Server provides the following isolation levels:

The locks described above are automatically acquired by the system. At any isolation level it is also possible to explicitly request and release table level locks using the LOCK and UNLOCK commands. Table level locks may also be automatically acquired by the system if a command that affects the table definition is issued (for example, ALTER, RENAME, CREATE INDEX). Table level locks that are held at a commit point are automatically released, therefore it is not necessary to explicitly release a table level lock.

The default level of isolation for the XDB Server is CS (Cursor Stability). In order to ensure a different level of isolation it is necessary to issue a command to reset the isolation level. The startup isolation level is set through the Options Utility. You can also temporarily change the isolation level by using the SET ISOLATION command (described in this manual) and by using the WITH clause (available in DB2 4.x and beyond) on certain SQL statements.

It is important to consider how different users' isolation level settings impact the integrity of the database. The database administrator must coordinate the isolation level requirements for all users, and define those cases in which exceptions will be permitted.