MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DISCARD with REORG

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
deepak_kumaran
Beginner


Joined: 05 Jan 2004
Posts: 5
Topics: 2

PostPosted: Fri Sep 17, 2004 11:48 am    Post subject: DISCARD with REORG Reply with quote

Hello,

We have some large DB2 tables in our shop. We plan to implement the DISCARD option with the REORG utility which is already executing regularly.

The issue we have is that some of the tables are related to each other by a referential constraint, with the CASCADE DELETE option.

Are there any steps we need to take when discarding rows in such a fasion?

For example, if we have tables B and C referring to table A, and I discard rows from table A, would tables B and C be placed in a non usable state (reorg pending?).

As of now, the best solution I can think of is the following:

If B and C refer to A, clear rows from B and C first. Then clear rows from A with a less restrictive filter so that the cascade condition doesn't apply.

If DB2 does a REORG, would it check for these conditions and set the pending states irrespectively?

I know it's a long post - just wanted to be clear Smile

Thanks,
Deepak
_________________
--
Regards,
Deepak
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Fri Sep 17, 2004 12:30 pm    Post subject: Reply with quote

Deepak kumaran,

Quote:

The issue we have is that some of the tables are related to each other by a referential constraint, with the CASCADE DELETE option.

For example, if we have tables B and C referring to table A, and I discard rows from table A, would tables B and C be placed in a non usable state (reorg pending?).



Discarding rows from a table that is part of a referential integrity set sets the CHECK pending status.

check this link which explains in detail about the options used in Reorg

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNUGH13/2.21.1.2?SHELF=&DT=20020826194002&CASE=

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
deepak_kumaran
Beginner


Joined: 05 Jan 2004
Posts: 5
Topics: 2

PostPosted: Fri Sep 17, 2004 1:45 pm    Post subject: Reply with quote

Thanks Kolusu.

Your reply helps a lot. It causes new problems, but I am now clear about what I need to do Smile

Regards,
Deepak
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group