Archive tables in a RC/Migrator migration
search cancel

Archive tables in a RC/Migrator migration

book

Article ID: 190806

calendar_today

Updated On:

Products

RC/Migrator for DB2 for z/OS

Issue/Introduction

Migration of a base table, it's archive table and all their dependent objects are able to be processed by RC/Migrator for Db2 for z/OS (RCM) without the need to
directly select the associated Archive table specifically.

The control of the selection and processing of base and associated tables in the migration strategy is achieved now with the use of the Auxiliary Implode = Y analysis option.
This will implode the archive table and pull in the archive tablespace, database, and storage group or whatever implode/explode that is required. 

Global changes for the table creator/name and the archive table and name can also be applied.

The ALTER TABLE ENABLE ARCHIVE statements are generated also.

Resolution

Consider this structure:

TABLESPACE   DATABASE  TABLENAME           TBCREATR INDEXNAME      IXCREATR
TS1          DB1       TB1                 authid   IX1            authid
TS2          DB1       TB1_ARCH            authid   IX1_ARCH       authid

Table TB1 uses TB1_ARCH as it's archive table.

When a Migration Strategy is used where the tablespace or base table of the archive table is analyzed using Aux Implode = Y and all the object types are selected 
for Implode and Explode, the analysis selects the archive table and it's dependEnt and parent objects.

When the analysis output is examined, the selected structure can be seen.

SG authid.stogroup
  DB authid.DB1
    TS DB1.TS2
      T  authid.TB1_ARCH
        I  authid.IX1_ARCH
  DB authid.DB1
    TS DB1.TS1
      T  authid.TB1
        I  authid.IX1


If utilities were selected then the analysis generates unloads for the the base and archive table, generates the DDL for the objects above and also the
"ALTER   TABLE authid.TB1 ENABLE ARCHIVE USE authid.TB1_ARCH" statement to set up the target archive table, generates the loads for the
base table and the archive table, then generates the image copies and runstats for the two tablespaces if those are selected.

So, essentially the user does not have to know or specifically select the archive table or it's dependent objects. The strategy handles it for you. 

When updating the Strategy where the primary object is the table (TB1 above), in order to see if the archive table has been selected use the "L" line command in
the "S" column.

STRATEGY ===> TBROLE               DESCRIPTION  ===>
CREATOR  ===> authid               SHARE OPTION ===> U (U,Y,N,X,L)
SRC SSID ===> ssid                 NEW OBJECTS  ===> N (U,Y,N)
------------------------------------------------------------------ authid  >

   +IMPLODE+ +----- PRIMARY OBJECT ---------+  +------ EXPLODE OPTIONS ------->
S   SG DB TS TABLE NAME          CREATOR TYPE  MQ(IX VW A) IX VW(MQ(IX VW A))
L   A  A  A  TB1                 authid   T/R  _  _  _  _  A  _  _  _  _  _
******************************* BOTTOM OF DATA ********************************

after pressing enter.....

STRATEGY ===> TBROLE               DESCRIPTION  ===>
CREATOR  ===> authid               SHARE OPTION ===> U (U,Y,N,X,L)
SRC SSID ===> ssid                 NEW OBJECTS  ===> N (U,Y,N)
------------------------------------------------------------------ authid  >

   +IMPLODE+ +----- PRIMARY OBJECT ---------+  +------ EXPLODE OPTIONS ------->
S   SG DB TS TABLE NAME          CREATOR TYPE  MQ(IX VW A) IX VW(MQ(IX VW A))
_   A  A  A  TB1                 authid   T    _  _  _  _  A  _  _  _  _  _
_   A  A  A   TB1_ARCH           authid   R   _  _  _  _  A  _  _  _  _  _


The archive or "associated table" is listed indented below the primary table. Additional implode or explode options can then be specified for the archive table. 
The "R" that can be seen in the TYPE column above indicates that it is an Archive Table. 

The "L" command is also available on the command line: COMMAND ===> L, it is a toggle which expands or collapses the associated tables.

From the online HELP: 
The "L" command expands all base and associated table pairs into two lines or collapses all base and associated table pairs into a single line.
When expanded, options can be specified for the tables individually.

Additional Information


Enhanced Associated Tables Support