DB2 COPY PENDING

DB2 COPY PENDING (COPY) restrictive status indicates that the affected object must be copied.

Causes of COPY PENDING status

  • If you load with LOG NO and do not take an inline copy (failed to include NOCOPYPEND), LOAD places a table space in the COPY-pending status.
  • The copy pending status will appear when image copies job fails while copying the data to Tape or DASD.
  • A state in which, an Image Copy on a table needs to be taken

Resolve COPY PENDING status

  • Run the Dummy image copy job and the Tablespace status changes from copy pending to RW (READ/WRITE).
  • If you dont want to take image copy, you can run Repair Utility
    //STEP01 EXEC DSNUPROC
      REPAIR SET TABLESPACE dbname.tsname NOCOPYPEND
  • Execute following db2 command to bring the status of tablespace to RW (READ/WRITE).
    START DATABASE(dbname) SPACE(tablespace-name) ACESS(FORCE)

DB2 COPY PENDING EXAMPLE

Following jobs remove copy pending and recovery pending status from a tablespace and removes copy pending, recovery pending status, and rebuild pending status from an index space

//STEPO1 EXEC PGM=DSNUTILB,REGIONM, 
// PARM='DB2X,MIGRDAN, '
//STEPLIB DD DSN=XXX.XXXXX.SDSNLOAD,DISP=SHR
//SYSIN DD *    
REPAIR SET TABLESPACE XXXXX.XXXXX NOCOPYPEND 
REPAIR SET TABLESPACE XXXXX.XXXXX NORCVRPEND
REPAIR SET INDEX XXXXX.XXXXX NOCOPYPEND
REPAIR SET INDEX XXXXX.XXXXX NORCVRPEND
REPAIR SET INDEX XXXXX.XXXXX NORBDPEND
/*
//SYSPRINT DD SYSOUT=* 
//UTPRINT DD SYSOUT=*

DB2 COPY Utility

The COPY online utility creates up to four image copies of any of the following

objects: table space, table space partition, data set of linear table space, index

space, or index space partition.

The two types of image copies are:

  • A full image copy, which is a copy of all pages in a table space, partition, dataset, or index space.
  • An incremental image copy, which is a copy only of those data pages that have been modified since the last use of the COPY utility and system pages.

The RECOVER utility uses these copies when recovering a table space or index

space to the most recent time or to a previous time. Copies can also be used by the

MERGECOPY, RECOVER, COPYTOCOPY, and UNLOAD utilities.

Read DB2 blogs: Click Here IBM DB2 Manual: Click Here

Scroll to Top