Adding partitions to a table in a 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?
Release : 20.0
Component : CA RC/Compare for DB2 for z/OS
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.