DB2

DB2 COPY PENDING status and recovery

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

Admin

Share
Published by
Admin

Recent Posts

AI Product Owner : Use Cases with Examples and Tools

The Product Owner role has shifted from just being a requirements proxy to a strategic,…

9 months ago

Business Value: Crafting User Stories for Measurable Impact

Business Value: In the world of Agile development, the user story has long been the…

10 months ago

SAFe Scrum Master (SSM) Certification with FAQ and Tips

The SAFe Scrum Master certification has become one of the most sought-after credentials for Agile…

1 year ago

PSK Practice Exam Practice Mode Questions

The Professional Scrum with Kanban (PSK) course enhances your organization's ability to deliver value efficiently…

1 year ago

Effective User Interviews in Scrum Framework

Effective User interviews play a crucial role in Scrum methodology, helping Product Owners and Scrum…

1 year ago

User Research Tools and Techniques for Product Owners

Product Owners should be well-versed in various user research tools and techniques to effectively understand…

1 year ago