IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

What is Copy pending and Check pending


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
prasadrachuri

New User


Joined: 19 Aug 2003
Posts: 20
Location: kolkata

PostPosted: Wed Aug 20, 2003 11:07 am
Reply with quote

can any one explain what is copy pending and check pending and why this happens to a table.

i got these when i'm downloading/uploading table from/to a flat file.

waiting for responce..
Thanks in advance..
prasad rachuri
Back to top
View user's profile Send private message
mdtendulkar

Active User


Joined: 29 Jul 2003
Posts: 237
Location: USA

PostPosted: Wed Aug 20, 2003 2:57 pm
Reply with quote

Hello prasadrachuri,


COPY PENDING
A state in which, an Image Copy on a table needs to be taken, In this status, the table is available only for queries. You cannot update this table. To remove the COPY PENDING status, you take an image copy or use REPAIR utility.

CHECK PENDING
When a table is LOADed with ENFORCE NO option, then the table is left in CHECK PENDING status. It means that the LOAD utility did not perform constraint checking.

Hope this helps you,

Regards

Mayuresh Tendulkar
Back to top
View user's profile Send private message
prasadrachuri

New User


Joined: 19 Aug 2003
Posts: 20
Location: kolkata

PostPosted: Wed Aug 20, 2003 3:20 pm
Reply with quote

Dear Tendulkar,
Thanks for your reply..but how can i remove CHECK PENDING for the child tables(if any constraint checking is made) with in the upload jcl.

i hope you got my question

Thanks in advance..
Back to top
View user's profile Send private message
rimli

New User


Joined: 21 Aug 2003
Posts: 5

PostPosted: Tue Aug 26, 2003 4:04 pm
Reply with quote

Hi Prasad,

You can try with the SYSIN option in the upload JCL :

REPAIR SET TABLESPACE SWCOSTII.SWCOSTSB NOCHECKPEND


Hope that helps!!


Thanks,
Rimli.
Back to top
View user's profile Send private message
ksannigeri

New User


Joined: 08 Apr 2005
Posts: 18

PostPosted: Thu Sep 07, 2006 1:33 pm
Reply with quote

Hi,

In copypend status... you cannot edit a table.....only u can run queries on that table..not update

while in Check pending status. you can edit or load table by giving ENFORCE NO option...

Thanks

Kiran
Back to top
View user's profile Send private message
senthilssg

New User


Joined: 09 Dec 2005
Posts: 64
Location: USA

PostPosted: Tue Sep 25, 2007 8:23 pm
Reply with quote

Hi ,

If the tablespace is in Copy pending status and you dont want to take image copy , then you can use REPAIR utility or execute following db2 command to bring the status of tablespace to RW

Code:
-START DATABASE(dbname) SPACE(tablespace-name) ACESS(FORCE) .


This command will reset all the pending states and change the status of the tablespace to RW .


Regards
Senthil
Back to top
View user's profile Send private message
mbr_raja

New User


Joined: 15 Nov 2004
Posts: 26
Location: Chennai, India

PostPosted: Wed Sep 26, 2007 5:11 pm
Reply with quote

The copy pending status will appear when image copies job fails while copying the data to Tape or DASD. So the Tablespace status will be copy pending status and the table will be an read only table with no updates.

The check pending status will appear when Referential Intergrity(RI) voilation between data in parent table with child table. During the program access, when RI violation encounterous the database it immediately put in CHKP staus.

The following option will overcome the problem,
1) Copy Pending status - Run the Dummy image copy job and the Tablespace status changes from copy pending to RW

2) Check Pending staus - Run the Check data for those tablespace and the Tablespace status changes from chkp to RW.

The Status RW (READ/WRITE) means that the database is ready to do database processing.

Copy Pending status


Quote:
1. Run Repair Utility
//STEP01 EXEC DSNUPROC
REPAIR SET TABLESPACE dbname.tsname NOCOPYPEND

2. Run the Dummy image copy job and the Tablespace status changes from copy pending to RW
3. Execute following db2 command to bring the status of tablespace to RW
-START DATABASE(dbname) SPACE(tablespace-name) ACESS(FORCE)


Check Pending status
Quote:
1. Run Repair Utility
//STEP01 EXEC DSNUPROC
REPAIR SET TABLESPACE dbname.tsname NOCHECKPEND

2. Run the Check data for those tablespace and the Tablespace status changes from CHKP to RW.
3. You can execute the following query (This command will restart the tablespace and reset all the pending states on the tablespace and the table will be back in RW (read write mode).
-START DATABASE(dbname) SPACE(tablespace-name) ACESS(FORCE)
Back to top
View user's profile Send private message
saptagiri kintali

New User


Joined: 21 Sep 2007
Posts: 20
Location: chennai

PostPosted: Wed Sep 26, 2007 7:42 pm
Reply with quote

as check pending there are so may reasons
like
1.if u r dealing with foriegn key and u r inserting a value in to the child table and which is not present in the corresponding column in parent table.
2.when u are altering ur table by adding a check constraint for col in which already some values are there in that column then it will be in pending status because of the values which are violating in that column for that u can give enforce NO this will neglect that check constraint
Back to top
View user's profile Send private message
cvijay784
Warnings : 1

New User


Joined: 18 Jun 2008
Posts: 54
Location: Colombo

PostPosted: Wed Apr 06, 2011 2:42 pm
Reply with quote

Hi,

Table that is loaded already with 'ENFORCE NO' option got check pending. Because records in child table not there in parent table.

I would like to remove the check pending from the child table. I ran the following command but doesn't work. Please suggest me how to remove it.

CHECK DATA DBNAME.TBSPACE SCOPE ALL



Thanks
Vijay
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Wed Apr 06, 2011 9:05 pm
Reply with quote

Hi Vijay,

First, you should have opened-up a new topic. Rules are not to open up an old topic.

Second ENFORCE NO in the load job will place the tablespace in check pending, if there is a referential constraint defined on that table. Since the referential constraint is defined on that table, you got the check-pending.

Since you already figured out what's the issue, try any of the below to remove the check-pending.

1. Insert the corresponding rows in the parent table and run CHECK DATA
2. Move the violating rows to the exception tables as in example(DB2 V9 Utility Guide and reference --> CHECK DATA --> First do Example 2 for your table and then try Example 1.
3. Run Repair Utility only in test. Not recommended for production or uat.


Thanks,
Sushanth
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
Search our Forums:

Back to Top