If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Check-pending status in DB2 tables

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-17-10, 03:13
srilata83 srilata83 is offline
Registered User
 
Join Date: Aug 2009
Posts: 6
Check-pending status in DB2 tables

Hi,
we are running some DB2 load utilty job to empty the DB2 (multiple) tables by loading with a dummy file.we are giving in the control card as follows
===>
LOAD DATA LOG NO INDDN SYSREC REPLACE INTO TABLE
creator.tablename1 NOCOPYPEND
LOAD DATA LOG NO INDDN SYSREC REPLACE INTO TABLE
creator.tablename2 NOCOPYPEND

But after loading some of the tables are going to check pending status.

My question is: Is it okay to add NOCHECKPEND into the load cards?Whats the risk involved?Which is the better idea: To run the check data utilty after the tables goes to check-pending status or adding nocheckpend or using ENFORCE NO is more advisable?

I als0 checked for DDL of the tables.It is as:
ALTER TABLE creator.tablename1
FOREIGN KEY key1
(column1)
REFERENCES creator.tablename
ON DELETE CASCADE ;



I would appreciate your any kind of help.Thanks in advance !!!
Reply With Quote
  #2 (permalink)  
Old 06-17-10, 07:07
Stealth_DBA Stealth_DBA is offline
Registered User
 
Join Date: May 2009
Posts: 472
srilata83, you don't say but it looks like you are using DB2 z/OS based on the Load syntax.

NOCHECKPEND is not an option you can use with the Load utility.

You problem may be solved by running your load statements in an order that will eliminate the Check Pending status. For example if you have 3 tables in an RI string like:

Table1 parent to Table2 parent to Table3

and you ran the Load on Table3 and then Table2, Table3 will be left in Check Pending because its parent table was Loaded. However, if you ran the Load on Table2 and then Table3, no tables would be left in Check Pending.
Reply With Quote
  #3 (permalink)  
Old 06-17-10, 09:05
dav1mo dav1mo is offline
Registered User
 
Join Date: Dec 2007
Location: Richmond, VA
Posts: 782
I completely agree with Stealth. You are emptying the tables, so ENFORCE YES and do them in the proper order.
Dave
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On