Extract all the RI ALTER statements for a set of tables. Generate only alters for table objects that are associated with the referential integrity structure.
DB2 for Z/OS
All the RI ALTER statements for a set of tables are able to be extracted by setting some specific Analysis Options in a MIGRATION strategy.
Regardless of the LEVEL of objects chosen , Database, Tablespace or Table, the Analysis will extract the associated RI, or more accurately, the Analysis Options will exclude everything other than the RI ALTER statements.
During the Analysis of a Migration Strategy in the UPDATE OPTIONS:
1. Set the Exclusive Options, BND/DAT/STA/SQL/GRNT/RI to "I"
NO .AUTHS ==> Y
BND/DAT/STA/SQL/GRNT/RI ==> I <------------I for RI only.
2. Turn off all utilities as you don't want any generated.
STATS (Y,N,S,A)==> N
CHECK DATA ==> N
COPY (Y,P,N) ==> N
(B)IND/(R)EBND ==> N
REBUILD INDEX ==> N
3. Turn off unloading and loading rows as you don't want any utilities doing that:
Data Unload Options
ALL ROWS ==> N
4. Set the RI scope accordingly:
RI (foreign keys) ==> G or L
This will generate only ALTER statements for table objects that are part of the strategy and associated with the referential integrity structure.