ALTER TABLE DROP COLUMN Support in RC/Migrator
search cancel

ALTER TABLE DROP COLUMN Support in RC/Migrator

book

Article ID: 15373

calendar_today

Updated On:

Products

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

Issue/Introduction

Requirement to drop a column of a table with RC/Update for Db2 for z/OS (RCU) alteration or a RC/Migrator for Db2 for z/OS (RCM) strategy.
However, a DROP TABLE is generated instead of ALTER TABLE ..  DROP COLUMN ...

Resolution

Ensure that there are no Db2 restrictions for dropping the column, e.g. if the containing table space is not a universal table space.

See a complete list here:

ALTER TABLE

 (search for ‘A column cannot be dropped if any of the following conditions are true’)

This ability was introduced in Database Management Solutions release r19 release

ALTER TABLE DROP COLUMN Support


Note that in RC/Migrator, a column is signified to be dropped when editing the table in question and a "D" delete line command is used inside the strategy to delete the column.

The Analysis then decides based on the Db2 rules for the associated tablespace type and other analysis settings if it will utilize a ALTER TABLE DROP COLUMN
statement or it may just drop and recreate the table.