Concurrency and compatibility for COPY

The COPY utility has certain concurrency and compatibility characteristics associated with it.

Db2 treats individual data and index partitions as distinct target objects. Utilities that operate on different partitions of the same table space or index space are compatible.

Restricted states

Do not copy a table space that is in any of the following states:

  • CHECK-pending
  • RECOVER-pending
  • REFRESH-pending
  • Logical error range
  • Group buffer pool RECOVER-pending
  • Stopped
  • STOP-pending
  • PRO restricted status

Do not copy an index space that is in any of the following states:

  • CHECK-pending
  • REBUILD-pending
  • RECOVER-pending
  • REFRESH pending
  • Logical error range
  • Group buffer pool RECOVER-pending
  • Stopped
  • STOP-pending

If a table space is in COPY-pending status, or a table space or index is in informational COPY-pending status, you can reset the status only by taking a full image copy of the entire table space, all partitions of the partitioned table space, or the index space. When you make an image copy of a partition, the COPY-pending status of the partition is reset. If a nonpartitioned table space is in COPY-pending status, you can reset the status only by taking a full image copy of the entire table space, and not of each data set.

Claims and drains

The following table lists any claims or drains that the utility acquires and any restrictive states that are set on the target object.

Table 1. Claim classes of COPY operations
Target SHRLEVEL REFERENCE SHRLEVEL CHANGE
Table space, index space, or partition DW UTRO CR UTRW1
Table notes:
  1. If the target object is a segmented (non-UTS) table space, SHRLEVEL CHANGE does not allow you to concurrently execute an SQL DELETE without the WHERE clause.
Table legend:
  • DW - Drain the write claim class - concurrent access for SQL readers
  • CR - Claim the read claim class
  • UTRO - Utility restrictive state, read-only access allowed
  • UTRW - Utility restrictive state, read-write access allowed

COPY does not set a utility restrictive state if the target object is DSNDB01.SYSUTILX.

Compatibility

The following table documents which utilities can run concurrently with COPY on the same target object. The target object can be a table space, an index space, or a partition of a table space or index space. If compatibility depends on particular options of a utility, that information is also documented in the table.

Table 2. Compatibility of COPY with other utilities
Action COPY INDEXSPACE SHRLEVEL REFERENCE COPY INDEXSPACE SHRLEVEL CHANGE COPY TABLESPACE SHRLEVEL REFERENCE1 COPY TABLESPACE SHRLEVEL CHANGE
BACKUP SYSTEM Yes Yes Yes Yes
CHECK DATA Yes Yes No No
CHECK INDEX Yes Yes Yes Yes
CHECK LOB Yes Yes Yes Yes
COPY INDEXSPACE No No Yes Yes
COPY TABLESPACE Yes Yes No No
COPYTOCOPY No No No No
DIAGNOSE Yes Yes Yes Yes
LOAD No No No No
MERGECOPY No No No No
MODIFY No No No No
QUIESCE Yes No Yes No
REBUILD INDEX No No Yes Yes
RECOVER INDEX No No Yes Yes
RECOVER TABLESPACE Yes Yes No No
REORG INDEX No No Yes Yes
REORG TABLESPACE SHRLEVEL CHANGE No No No Yes2
REORG TABLESPACE UNLOAD CONTINUE or PAUSE No No No No
REORG TABLESPACE UNLOAD ONLY or EXTERNAL Yes Yes Yes Yes
REPAIR LOCATE by KEY, RID, or PAGE DUMP or VERIFY Yes Yes Yes Yes
REPAIR LOCATE by KEY or RID DELETE or REPLACE No No No No
REPAIR LOCATE INDEX PAGE REPLACE No No Yes No
REPAIR LOCATE TABLESPACE PAGE REPLACE Yes Yes No No
REPORT Yes Yes Yes Yes
RESTORE SYSTEM No No No No
RUNSTATS INDEX Yes Yes Yes Yes
RUNSTATS TABLESPACE Yes Yes Yes Yes
STOSPACE Yes Yes Yes Yes
UNLOAD1 Yes Yes Yes Yes
Table notes:
  1. If CONCURRENT option is used, contention might be encountered when other utilities are run on the same object at the same time.
  2. REORG TABLESPACE SHRLEVEL CHANGE and COPY SHRLEVEL CHANGE are compatible and can run concurrently except during the period when exclusive control is needed to drain claimers of a target table space.
    Restriction:
    • COPY with the FLASHCOPY CONSISTENT option is not compatible with REORG.
    • If REORG has drained the claimers of a table space or table space partition and a COPY utility is submitted to access the same object, the COPY utility terminates with a message that it is not compatible.
    • If COPY and REORG are accessing the same table space or table space partitions, REORG cannot drain claimers until COPY completes. The REORG DRAIN options determine the actions taken.
    • If COPY and REORG are accessing the same table space or table space partitions and COPY abends, restart of the COPY is not allowed if REORG completes.

To run on DSNDB01.SYSUTILX, COPY must be the only utility in the job step. Also, if SHRLEVEL REFERENCE is specified, the COPY job of DSNDB01.SYSUTILX must be the only utility running in the Sysplex.

COPY on SYSUTILX is an exclusive job; such a job can interrupt another job between job steps, possibly causing the interrupted job to time out.