RC/Migrator for DB2 for Z/OS : Referential Integrity Analysis Options
search cancel

RC/Migrator for DB2 for Z/OS : Referential Integrity Analysis Options

book

Article ID: 58176

calendar_today

Updated On:

Products

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

Issue/Introduction

Creating a migration job that runs on one subsystem and generates the DDL for the database, table, tablespace, synonym etc. on another. In the analysis Option RI = S was selected. The databases, tables, tablespaces, etc. are complete but it did not bring over the RI. What did I need to do to get the RI generated?

 

Environment

Release: R20
Component: RC/Migrator for Db2 for Z/OS 

Resolution

One of the CONTROL options is RI (Local or Global).

This options specifies whether to include foreign keys and parent tables (with their indexes) for child tables in the strategy. Valid values are as follows:

N

Does not include the foreign keys and parent tables.

L

Includes only local referential integrity (foreign keys only).

G

Includes all referential integrity (foreign keys and parent tables).

Note: Also included in the strategy are foreign keys and parent tables (with their indexes) for included parent tables. This occurs whenever the parent table is also a child table.

S

Uses the value that was specified when the strategy was created.

So if the RI option in the strategy was generated with RI=N or blank, specifying RI=S on the analysis option screen means RI will not be generated for the selected tables.

In the Analysis Options, RI = S, will not override the setting used when the Strategy was created. When the strategy was created there is an RI setting in the EXPLODE OPTIONS.

This setting may have been left as a blank which means that it does not include referential integrity definitions unless this is overridden at analysis time.

   +-IMPLODE-+ +- PRIMARY OBJECT -+ +------------ EXPLODE OPTIONS -----------> >-EXPL OPT-+  AUX RTN MQT SEQ      SECU ALL  NUMBER
S   SG           DATABASE CREATOR    TS TB(MQ(IX VW A))   IX VW(MQ(IX VW A)       A   TG     IMP IMP IMP IMP   RI RITY ROWS OF ROWS
_   _            DBCORP   authid1    _  _  _  _  _  _     _  _  _  _  _  _ _   _      _   _   _   _     _   _   _    ________

Field:  RI (Referential Integrity)

Description:  Specify whether to include referential integrity in the migration structure.

Values:  N  (Default)  Do not include referential integrity definitions.  (Table definitions  will still include primary key definitions.)

             L  Local.  Include only local referential integrity, that is, foreign key definitions for any tables involved in the migration.

            G  Global.  Include all referential integrity, that is, include all foreign key definitions and all tables in the referential structure.

Notice above there is no "S" option on this one since we are creating the strategy at this point.

At analysis time, in order to get RI ALTER statements generated, specify the Control Options, RI  = L or G as listed above.

L : Includes only local referential integrity (foreign keys only).

G: Includes all referential integrity (foreign keys and parent tables). Note: Also included in the strategy are foreign keys and parent tables (with their indexes) for included parent tables. This occurs whenever the parent table is also a child table.

Additional Information

This information is documented in the RC/Migrator User Guide, Strategy Analysis,Analysis Options,Control Options