Encountered a situation where a RC/Migrator for Db2 for z/OS (RCM) Alter strategy shows more than 2000 packages selected for rebind,
but there are only 37 packages that are dependent on the table.
RC/Query for Db2 for z/OS (RCQ) report T/PK shows 37 associated packages:
DB2 Object ===> T Option ===> PK Where => N
Table Name ===> table1 > Creator ===> authid >
Qualifier ===> * > N/A ===> * >
oc: LOCAL ---------- SSID: ssid LVL: 01 -xxxxxxx- LINE 01 OF 37 >
MD TABLE NAME CREATOR PACKAGE COLLECTION PCREATOR BINDDATE
When a referential constraint is defined with a delete rule of CASCADE or SET NULL, all plans and packages that refer to the parent table of the constraint are invalidated.
Furthermore, all plans and packages that refer to tables from which deletes cascade to this parent table are also invalidated.
Child table authid.table1 is altered to add a new column.
This table is involved in a RI relationship with parent table authid.parent1 and the DELETE rule is CASCADE. So the packages that refer to the parent table are invalidated.
RCM will generate REBINDs for all the packages that will be invalidated for this parent table also.
The Child table authid.table1 is also involved in another RI relationship with another parent table authid.parent2 with delete rule RESTRICT so the packages are not invalidated.
Query SYSIBM.SYSRELS using table authid.parent1 as child table and find out if this table is involved in any other RI.
RCM uses this process to generate REBIND for plan/package that are invalidated due to the CASCADE.