Automap strategy fails with an RMA456E indicating duplicate table primary keys constraint within RC/Compare
search cancel

Automap strategy fails with an RMA456E indicating duplicate table primary keys constraint within RC/Compare

book

Article ID: 200052

calendar_today

Updated On:

Products

RC Compare for DB2 for z/OS Database Management for DB2 for z/OS - Administration Suite RC/Migrator for DB2 for z/OS RC/Update for DB2 for z/OS

Issue/Introduction

An  RC/Compare for Db2 for z/OS strategy execution receives the following error, how can this be resolved?

  RMA456E MORE THAN ONE PRIMARY CONSTRAINT HAS BEEN SPECIFIED FOR TABLE         
       User1.Table2. THE FOLLOWING DUPLICATE CONSTRAINTS CAN NOT BE      
       CREATED: (PRIMARY KEY) AND (PRIMARY KEY).        

A partial change was made to a table's primary key constraint on the Source environment, but is not ready to take effect.
The Target environment has the original primary key constraint. 

When analyzing a Compare strategy, a Rule Set is used to tell the Compare which attributes should and should not be compared:

A value of Y next to an attribute indicates that the source value of the attribute should be used.
A value of N next to an attribute indicates that the target value of the attribute should be used.

The attribute MOVE_UNPAIRED_SRC_CONSTS  was set to 'Y'.

Environment

Release : 20.0
Component : RC/Migrator for Db2 for z/OS

Cause

Per the documentation:

RMA456E
 
More than one primary constraint has been specified for table tablecreator.tablename. The following duplicate 
constraints cannot be created: constraint1 and constraint2.

Duplicate constraints cannot be created. Only one primary constraint can be specified for a table.

Resolution

To avoid the error, both of these attributes in the Ruleset should be 'N' so no action is taken regarding the Constraints. 

MOVE_UNPAIRED_SRC_CONSTS     N
DROP_UNPAIRED_TRG_CONSTS     N