Concurrency and compatibility of utilities
Two utilities are considered compatible if they do not need access to the same object at the same time in incompatible modes. The concurrent operation of two utilities is not typically controlled by either drain locks or transaction locks, but merely by a set of compatibility rules.
Before a utility starts, it
is checked against all other utilities running on the same target
object. The utility starts only if all the others are compatible.
The check for compatibility obeys the following rules:
- The check is made for each target object, but only for target objects. Typical utilities access
one or more table spaces or indexes, but if two utility jobs use none of the same target objects,
the jobs are always compatible.
An exception is a case in which one utility must update a catalog or directory table space that is not the direct target of the utility. For example, the LOAD utility on a user table space updates DSNDB06.SYSTSCPY. Therefore, utilities other than REORG SHRLEVEL CHANGE that have DSNDB06.SYSTSCPY as a target might not be compatible.
- Individual data and index partitions are treated as distinct target objects. Utilities operating on different partitions in the same table or index space are compatible.
- When two utilities access the same target object, their most restrictive
access modes determine whether they are compatible. For example, if
utility job 1 reads a table space during one phase and writes during
the next, it is considered a writer. It cannot start concurrently
with utility 2, which allows only readers on the table space. (Without
this restriction, utility 1 might start and run concurrently with
utility 2 for one phase; but then it would fail in the second phase,
because it could not become a writer concurrently with utility 2.)
An exception is that REORG TABLESPACE SHRLEVEL CHANGE and COPY SHRLEVEL CHANGE are compatible and can run concurrently except during the period when exclusive control is needed by REORG to drain claimers of a target table space.
The following figure illustrates how SQL applications and Db2 utilities can operate concurrently on separate partitions of the same table space.