Adding partitions to a table in a RC/Compare for Db2 for z/OS (RCC) compare strategy generates DDL to DROP/CREATE the Tablespace rather than
ALTER TABLE statements to add the new partitions. Why do we not generate ALTER statements in this scenario.
The DROP/CREATE of the tablespace occurs in this scenario when tablespace is the primary object in the strategy.
This is because the source tablespace has more partitions than the target and therefore the analysis will DROP/CREATE the tablespace and the dependent objects are created with the appropriate changes.
The only way to avoid this behavior in the tablespace level Compare, is to stop RC/Compare from detecting these changes to the tablespace, by setting the PARTITIONS ruleset attributes to N.
To achieve ALTER statements to add the new partitions to the table, then the primary object in the strategy must be the table. The Compare is then at the table level and the analysis generates the ALTER TABLE ADD PARTITION statements.