ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Adding partitions in a Compare strategy generates DDL to DROP/CREATE the Tablespace

book

Article ID: 208764

calendar_today

Updated On:

Products

RC Compare for DB2 for z/OS RC/Migrator for DB2 for z/OS

Issue/Introduction

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?

 

Environment

Release : 20.0

Component : CA RC/Compare for DB2 for z/OS

Resolution

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.