Taking an inline COPY with LOAD

An inline copy is an image copy that is taken during utility processing for a utility other than the COPY utility. For example, during LOAD execution, you can create a full image copy data set.

About this task

The advantage of taking an inline copy is that the table space is not left in COPY-pending status regardless of which LOG option was specified for the utility. Thus, data availability is increased.

Procedure

To take an inline copy:

Use the COPYDDN and RECOVERYDDN options as follows:
  • You can specify up to two primary copies (with COPYDDN) and two secondary copies (with RECOVERYDDN).
  • Start of changeWith COPYDDN and RECOVERYDDN, you can specify LOAD REPLACE or LOAD RESUME YES SHRLEVEL NONE. If you specify RESUME NO but not REPLACE, an error message is issued and LOAD terminates.End of change

The requested inline copies are produced during the RELOAD phase of LOAD processing.

If you take an inline image copy of a table that has LOB columns, Db2 makes a copy of the base table space, but does not copy the LOB table spaces.

The SYSCOPY record that is produced by an inline copy contains ICTYPE=F and SHRLEVEL=R. The value of the STYPE column depends on how the image copy was produced:

  • R if the image copy was produced by LOAD REPLACE LOG(YES)
  • S if the image copy was produced by LOAD REPLACE LOG(NO)
  • Start of changeY if the image copy was produced by LOAD RESUME LOG(NO)End of change
  • Start of changeZ if the image copy was produced by LOAD RESUME LOG(YES)End of change

The data set that is produced by the inline copy is logically equivalent to a full image copy with SHRLEVEL REFERENCE, but the data within the data set differs in the following ways:

  • Data pages might be out of sequence and some might be repeated. If pages are repeated, the last one is always the correct copy.
  • Space map pages are out of sequence and might be repeated.
  • If the compression dictionary is rebuilt with LOAD, the set of dictionary pages occurs twice in the data set, with the second set being the correct one.

The total number of duplicate pages is small, with a negligible effect on the required space for the data set.

Start of changeDepending on where the resume-spec is specified (at the partition level or table space level), the resulting image copy might be a partial image copy. If you specify COPYDDN or RECOVERYDDN at the table space level and also specify at least one INTO TABLE PART clause, the resulting inline image copy includes only pages of the partitions that are specified in the LOAD statement.End of change