Effects of running LOAD

The effects of running LOAD can be different, depending on your situation. Running the LOAD utility can have effects on index version numbers, control intervals, and table spaces that are defined with the NOT LOGGED attribute.

The effect of LOAD on index version numbers

DB2® stores the range of used index version numbers in the OLDEST_VERSION and CURRENT_VERSION columns of the following catalog tables:

  • SYSIBM.SYSINDEXES
  • SYSIBM.SYSINDEXPART

The OLDEST_VERSION column contains the oldest used version number, and the CURRENT_VERSION column contains the current version number.

When you run LOAD with the REPLACE option, the utility updates this range of used version numbers for indexes that are defined with the COPY NO attribute. LOAD REPLACE sets the OLDEST_VERSION column to the current version number, which indicates that only one version is active; DB2 can then reuse all of the other version numbers.

Recycling of version numbers is required when all of the version numbers are being used. All version numbers are being used when one of the following situations is true:

  • The value in the CURRENT_VERSION column is less than the value in the OLDEST_VERSION column.
  • The value in the CURRENT_VERSION column is 15, and the value in the OLDEST_VERSION column is 0 or 1.

You can also run REBUILD INDEX, REORG INDEX, or REORG TABLESPACE to recycle version numbers for indexes that are defined with the COPY NO attribute. To recycle version numbers for indexes that are defined with the COPY YES attribute or for table spaces, run MODIFY RECOVERY.

The effect of LOAD REPLACE on the control interval

When you run a LOAD job with the REPLACE option but without the REUSE option and the data set that contains the data is DB2-managed, DB2 deletes this data set before the LOAD and redefines a new data set with a control interval that matches the page size.

The effect of LOAD on table spaces defined with NOT LOGGED attribute

The following table shows the effect of LOAD table spaces defined with the NOT LOGGED attribute

Table 1. LOAD parameters
LOAD REORG LOG keyword Table space logging attribute Table space type What is logged Table space status after utility completes
LOG YES NOT LOGGED Non-LOB LOG YES changes to LOG NO No pending status or ICOPY-pending1
LOG YES NOT LOGGED LOB control information No pending status
LOG NO NOT LOGGED Non-LOB nothing No pending status or ICOPY-pending1
LOG NO NOT LOGGED LOB nothing No pending status
Note:
  1. The table space is set to ICOPY-pending status if the records are discarded and no pending status if the records are not discarded.