RC/Migrator does not generate the constraint name
search cancel

RC/Migrator does not generate the constraint name

book

Article ID: 72182

calendar_today

Updated On:

Products

RC Compare for DB2 for z/OS Database Analyzer for DB2 for z/OS Fast Unload for DB2 for z/OS Fast Check for DB2 for z/OS Fast Index for DB2 for z/OS Rapid Reorg for DB2 for z/OS

Issue/Introduction

A Compare is generating DDL to add a Primary Key to a table. The generated DDL is missing the unique constraint name.

ALTER TABLE creator.table 
ADD PRIMARY KEY 
(COL1 
,COL2 
); 


The constraint name is missing.

The same issue occurs with a migration, the constraint name is not shown:

,PRIMARY KEY          
   (CON_ID             
   ,COLLEGE_ID         
   )                   

Expect:

,CONSTRAINT CON_ID PRIMARY KEY        
   (CON_ID             
   ,COLLEGE_ID         
   )                   

Environment

Release:
Component: RCM

 

Resolution

Here is some detail regarding how constraints are generated in Migrator:

  • RCM does not generate the primary key constraint if it is the same name as the first key column, as that is the DB2 default behavior for the constraint name.
  • RCM will generate the constraint name if it is named something other than the 1st key column name, or if the constraint is on another column.
  • In V12R1M502 and later OFS (Object Framework Services) is used to generate the DDL and the constraint name will be generated either way.