How to fix a SQLCODE=-148 in a RC/Migrator strategy with a clone table?.

book

Article ID: 104031

calendar_today

Updated On:

Products

CA RC/Migrator CA Endevor SCM Interface DB2 Administration CA RC Compare for DB2 for z/OS CA RC Extract for DB2 for z/OS CA RC/Query CA RC Secure for DB2 for z/OS CA RC Update for DB2 for z/OS CA Database Analyzer for DB2 for z/OS CA Fast Unload for DB2 for z/OS CA Fast Check for DB2 for z/OS CA Fast Index for DB2 for z/OS CA Fast Load for DB2 for z/OS CA Rapid Reorg for DB2 for z/OS

Issue/Introduction

A RC/Migrator Compare strategy generated the following ALTER statements to add a column to a clone table.
 
ALTER TABLE ... DROP CLONE;
ALTER TABLE ... ADD ... to add the column.
ALTER TABLE ... ADD CLONE ... to add again the clone table.
This last ALTER statement was wrong and it created an SQLCODE = -148, the versioning has to be removed with a Reorg Utility after the ALTER TABLE ... ADD statement to add the column.
 
DSNT408I SQLCODE = -148, ERROR:  THE SOURCE TABLE OR TABLESPACE
         XXXXXX.CLONE_SAMPLE CANNOT BE ALTERED. REASON 09
DSNT418I SQLSTATE   = 42809 SQLSTATE RETURN CODE                
DSNT415I SQLERRP    = DSNXICLN SQL PROCEDURE DETECTING ERROR                                           
...

Environment

Release:
Component: RCM

Resolution

In order to resolve the SQLCODE -148, you need to work with the following steps.

1) Analyze again the Compare strategy using a Utility Model which has Online Reorg utilities defined.

_ Y OREORGT T PENDING DDL ONLINE REORG
_ Y OREORGTS TS PENDING DDL ONLINE REORG

The analysis will generate an Online Reorg utility statement after the ALTER TABLE ... ADD ... which adds a column to the base table.
 
2) Before executing the newly created strategy, you need to set the continue if warning to 'Y' in the Batch Processor Interface panel.
 
CONTINUE IF:               
 -WARNING            ===> Y