View previous topic :: View next topic
|
Author |
Message |
prasadrachuri
New User
Joined: 19 Aug 2003 Posts: 20 Location: kolkata
|
|
|
|
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 |
|
|
mdtendulkar
Active User
Joined: 29 Jul 2003 Posts: 237 Location: USA
|
|
|
|
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 |
|
|
prasadrachuri
New User
Joined: 19 Aug 2003 Posts: 20 Location: kolkata
|
|
|
|
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 |
|
|
rimli
New User
Joined: 21 Aug 2003 Posts: 5
|
|
|
|
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 |
|
|
ksannigeri
New User
Joined: 08 Apr 2005 Posts: 18
|
|
|
|
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 |
|
|
senthilssg
New User
Joined: 09 Dec 2005 Posts: 64 Location: USA
|
|
|
|
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 |
|
|
mbr_raja
New User
Joined: 15 Nov 2004 Posts: 26 Location: Chennai, India
|
|
|
|
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 |
|
|
saptagiri kintali
New User
Joined: 21 Sep 2007 Posts: 20 Location: chennai
|
|
|
|
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 |
|
|
cvijay784 Warnings : 1 New User
Joined: 18 Jun 2008 Posts: 54 Location: Colombo
|
|
|
|
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 |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
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 |
|
|
|