13 Phases DB2 Load Utility

Load utility executes in 13 phases in DB2. I have listed all the stages for your reference.



UTILINIT
 -Performs initialization.RELOADLoads record types and writes temporary file records for indexes and foreign keys. RELOAD makes one pass through the sequential input data set. Check constraints are checked for each row. Internal commits provide commit points at which to restart in case operation should halt in this phase.

RELOAD -Creates inline copies if you specified the COPYDDN or RECOVERYDDN keywords.A subtask is started at the beginning of the RELOAD phase to sort the keys. The sort subtask initializes and waits for the main RELOAD phase to pass its keys to SORT.

RELOAD loads the data, extract the keys, and passes them in memory for sorting. At the end of the RELOAD phase, the last key is passed to SORT, and record sorting completes. Note that load partition parallelism starts subtasks. PREFORMAT for tablespaces occurs at the end of the RELOAD phase.

SORT – Sorts temporary file records before creating indexes or validating referential constraints, if indexes or foreign keys exist.

The SORT phase is skipped if all the following conditions apply for the data that is processed during the RELOAD phase: Each table has no more than one key. All keys are the same type (index key only, indexed foreign key, or foreign key only).

The data that is being loaded or reloaded is in key order (if a key exists). If the key is an index key only and the index is a data-partitioned secondary index, the data is considered to be in order if the data is grouped by partition and ordered within the partition by key value.

If the key in question is an indexed foreign key and the index is a data-partitioned secondary index, the data is never considered to be in order. The data that is being loaded or reloaded is grouped by the table, and each input record is loaded into one table only.

SORT passes the sorted keys in memory to the BUILD phase, which builds the indexes.

BUILD –Creates indexes from temporary file records for all indexes that are defined on the loaded tables. Build also detects duplicate keys.

PREFORMAT –for indexes occurs at the end of the BUILD phase.

SORTBLD-Performs all activities that normally occur in both the SORT and BUILD phases, if you specify a parallel index build.

INDEXVAL –Corrects unique index violations or index evaluation errors from the information in SYSERR, if any exist.

ENFORCE –Checks referential constraints, except informational referential constraints, and corrects violations. Information about violations of referential constraints is stored in SYSERR.

DISCARD -Copies records that cause errors from the input data set to the discard data set.

REPORT –Generates a summary report, if you specified ENFORCE CONSTRAINT or if load index validation is performed. The report is sent to SYSPRINT.LOGAPPLYIf LOAD SHRLEVEL CHANGE FLASHCOPY CONSISTENT is specified, log apply applies the updates to the FlashCopy® image copy to ensure that all activity is reflected up to the point of consistency.

LOGCSR -If LOAD SHRLEVEL CHANGE FLASHCOPY CONSISTENT is specified, the LOGCSR phase identifies any uncommitted work to back out from the FlashCopy image copy.

LOGUNDO –If LOAD SHRLEVEL CHANGE FLASHCOPY CONSISTENT is specified, the LOGUNDO phase backs out uncommitted work from the FlashCopy image copy.

UTILTERM -Performs cleanup.

Related Posts

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.