Posted: Fri Sep 17, 2004 11:48 am Post subject: DISCARD with REORG
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?
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Fri Sep 17, 2004 12:30 pm Post subject:
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
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