How can I generate the ALTER statements for RI?

Document ID : KB000012861
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

A user is planning to drop a table that has RI constraints; 1 parent and 7 children. He would like to extract the RI DDL for later use.

Question:

How can I generate the ALTER statements for RI DDL from an RC/Migrator Analysis?

Environment:
DB2 for Z/os
Answer:

RC/Migrator has an Analysis Option called "Exclusive Options". One of these is "BND/DAT/STA/SQL/GRNT/RI ==>". This option has a number of values that each alter the generated output.


The appropriate value to generate RI Alter Statements is:

I          Generate only alters for table objects that are associated with
           the referential integrity structure.  You must specify the RI
           Control Option 'L' (Local) or 'G' (Global), or select 'RI' for
           at least one table on the RC/M Implode/Explode Services panel.
           The following selections on the Strategy Analysis Options panel
           will be ignored:  Drop Objects; Image Copy; Bind; Rebuild Index;
           and all Data Unload, Dataset Delete and VSAM Options.

As stated above in the help text for the field the accompanying option is
"RI (foreign keys) ==>" "G" or "L".

This will generate "ALTER TABLE" statements for the tables within the scope of the migration along with .SYNC statements and the other required CA Batch Processor statements such as .CONNECT and

Additional Information:

CA RC/Migrator for DB2 for z/OS and CA RC/Compare, Analysis Options, Exclusive Options