Restart of REORG TABLESPACE

You can restart a REORG TABLESPACE utility job.

By default, Db2 uses RESTART(CURRENT) when restarting REORG TABLESPACE jobs, with the following exceptions:

  • Jobs that are restarted in the SORT, BUILD, or SWITCH phase use RESTART(PHASE) by default.
  • Jobs with the SORTKEYS option that are restarted in the RELOAD, SORT, BUILD, or SORTBLD phase always restart from the beginning of the RELOAD phase.
  • Jobs with the SHRLEVEL REFERENCE, NOSYSREC, and SORTDATA options use RESTART(PHASE) to restart at the beginning of the UNLOAD phase.
  • Jobs with unload parallelism for REORG TABLESPACE SHRLEVEL NONE use RESTART(PHASE) to restart at the beginning of the UNLOAD and RELOAD phases.
  • Jobs that reorganize LOB table spaces use RESTART(PHASE).

If you restart a REORG job of one or more of the catalog or directory table spaces in the preceding list, you cannot use RESTART(CURRENT).

If you restart REORG in the UTILINIT phase, it re-executes from the beginning of the phase. If REORG abnormally terminates or system failure occurs while it is in the UTILTERM phase, you must restart the job with RESTART(PHASE).

The following table provides information about restarting REORG TABLESPACE, depending on the phase that REORG was in when the job stopped. For each phase of REORG and for each type of REORG TABLESPACE (with SHRLEVEL NONE, with SHRLEVEL REFERENCE, and with SHRLEVEL CHANGE), the following table indicates the types of restarts that are allowed (CURRENT and PHASE). A value of None indicates that no restart is allowed. The Data Sets Required column lists the data sets that must exist to perform the specified type of restart in the specified phase.

Table 1. REORG TABLESPACE utility restart information for SHRLEVEL NONE, REFERENCE, and CHANGE
Phase Type of restart allowed for SHRLEVEL NONE Type of restart allowed for SHRLEVEL REFERENCE Type of restart allowed for SHRLEVEL CHANGE Required data sets Notes
UNLOAD CURRENT, PHASE CURRENT, PHASE6 None SYSREC 7
RELOAD CURRENT, PHASE CURRENT, PHASE6 None SYSREC 1, 2, 7
SORT CURRENT, PHASE CURRENT, PHASE6 None None 2, 3, 7
BUILD CURRENT, PHASE CURRENT, PHASE6 None None 2, 3, 4, 7
SORTBLD CURRENT, PHASE CURRENT, PHASE6 None None 2, 7
LOG Phase does not occur Phase does not occur6 None None 7
SWITCH Phase does not occur CURRENT, PHASE CURRENT, PHASE Originals and shadows 3, 5, 7
Note:
  1. For None, if you specify NOSYSREC, restart is not possible, and you must execute the RECOVER TABLESPACE utility for the table space or partition. For REFERENCE, if the REORG job includes both SORTDATA and NOSYSREC, RESTART or RESTART(PHASE) restarts at the beginning of the UNLOAD phase.
  2. If you specify SHRLEVEL NONE or SHRLEVEL REFERENCE, and the job includes the SORTKEYS option, use RESTART or RESTART(PHASE) to restart at the beginning of the RELOAD phase.
  3. You can restart the utility with RESTART or RESTART(PHASE). However, because this phase does not take checkpoints, RESTART restarts from the beginning of the phase.
  4. If you specify the PART option with REORG TABLESPACE, you cannot restart the utility at the beginning of the BUILD phase if any nonpartitioning index is in a page set REBUILD-pending (PSRBD) status.
  5. If you specify REORG TABLESPACE SHRLEVEL REFERENCE PART with one or more nonpartitioned indexes, restart is allowed only in the SWITCH phase.
  6. For REORG TABLESPACE with SHRLEVEL REFERENCE and PART, if a nonpartitioned index is defined on the table space, REORG TABLESPACE cannot be restarted before the SWITCH phase.
  7. Start of changeFL 508 For a REORG TABLESPACE job (SHRLEVEL REFERENCE or CHANGE) that materializes a pending MOVE TABLE operation (an ALTER TABLESPACE statement with the MOVE TABLE clause), the utility is not restartable except in the UTILTERM phase. Alternatively, you can terminate and resubmit the job.End of change
If you restart a REORG STATISTICS job by using RESTART CURRENT, inline statistics are not collected. To update catalog statistics, run the RUNSTATS utility after the restarted job completes. Restarting a REORG STATISTICS job with RESTART(PHASE) is conditional after executing UNLOAD PAUSE. To determine if catalog table statistics are going to be updated, see the following table. This table shows whether or not statistics are updated for REORG STATISTICS jobs according to the phase in which the job terminated and the restart value that was used.
Table 2. Statistics collection for REORG TABLESPACE utility phase restart
Phase CURRENT PHASE
UTILINIT NO YES
UNLOAD NO YES
RELOAD NO YES
SORT NO NO
BUILD NO YES
SORTBLD NO YES