DB2 isolation levels for SQL statement execution with pureQuery Runtime

DB2® databases use isolation levels to manage concurrent access to data. In Java applications, the isolation level is set on the connection. To handle multiple isolation levels, the pureQuery StaticBinder utility binds four packages to the DB2 database server, one for each isolation level. At execution time, the isolation level that is set as part of the data source or dynamically within the application determines the package to select and execute.

The name of the package created on the target database is determined by the root package name plus any characters that are added by the Configure utility during its processing followed by a single digit: 1, 2, 3 or 4 depending upon the isolation level of the connection at execution time.

The isolation levels that are supported at run time are the four isolation levels that the DB2 data sources support:
  1. Uncommitted Read (UR)
  2. Cursor Stability (CS)
  3. Read Stability (RS)
  4. Repeatable Read(RR)

You set the root package name when you invoke the Configure utility by specifying the option -rootPkgName. If the packages need to be bound only at specific isolation levels, you can use the -isolationLevel bind option when you invoke the StaicBinder utility. If you use the -isolationLevel option when you perform a bind or specify the isolation level in the bind options string, only the package or DBRM file for the isolation level that you specify is created. The name follows the convention that the StaticBinder uses when creating packages or DBRM files for all four isolation levels.


Feedback