ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

RC/Migrator for Db2 for Z/OS: Create the DDL for all objects in a database to be used as a backup?


Article ID: 52939


Updated On:


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


RC/Migrator provides a DDL Only option that generates the necessary DDL statements needed to re-create a DB2 structure.

The generated DDL re-creates the DB2 structure including any referential integrity rules or security.



Release: R20
Component: RCM


Create a Migration strategy which specifies the Name and Creator of the Database on the RC/M Create Migration Strategy screen. It is best to use the 'A'  explode option.

PRIMARY OBJECT TYPE SPECIFICATION. ( Select one type with 'A' , 'S', or 'E' )
        _ Storage Group
        A Database
        _ Tablespace
        _ Table
        _ Materialized Query Table
        _ Index
        _ View
        _ Synonym/Alias
        _ Trigger
        _ Routine
        _ Sequence

Name ==> DBCORP              >  Creator ==> authid1   > Where ==> N

Once the required object(s) are selected and the Strategy is saved, carry out a Strategy Analysis.

When in the Update Options screen under the label "Exclusive Options" BND/DAT/STAT/SQL/GRNT/RI ==> , select S for SQL.

      Exclusive Options
NO .AUTHS               ==> Y
BND/DAT/STA/SQL/GRNT/RI ==> S <------------------

The 'S' option means:
S          Generate SQL only, with no CA Batch processor commands.  Provides a DDL/DCL snapshot.

This option will generate SQL only with no Batch Processor commands included. The result will contain no commands starting with a dot '.' such as .SYNC , .AUTH , .CONNECT and .SYSTEM.
It means that unlike a normal analysis output , the DDL generated can be executed by utilities like SPUFI or DSNTEP2 without any modifications.

In addition, ensure that the Update Options, Control Options , RI (foreign keys) ==> is set to "L" or "G" according to the requirements of the DDL to be generated so that RI are not missed.

Secondly, if the current security is also required to be part of the snapshot, ensure that Update Options, Control Options, SECURITY          ==> is set to 'Y'.
'Y' means include all security so there will be GRANT statements generated.

Lastly, you may wish to consider the analysis option TABLE OBID        ==>   Y ,   that adds the OBID of the table to the DDL. If the generated DDL could be used in an OBIDXLAT recovery situation then having the original OBID might be of use.

Additional Information

Exclusive Options

Control Options