Migrate tablespaces specifying DEFINE NO with RC/Migrator
search cancel

Migrate tablespaces specifying DEFINE NO with RC/Migrator

book

Article ID: 227150

calendar_today

Updated On:

Products

RC/Migrator for DB2 for z/OS

Issue/Introduction

How to migrate all the tablespaces from source subsystem to a target subsystem specifying DEFINE NO
for all the tablespaces and indexspaces using RC/Migrator for Db2 for z/OS (RCM).

Resolution

This is done on a Migration Strategy using GLOBAL CHANGES when performing the analysis of the strategy.

The Global Change set must be altered so that the DEFINE value changes all source values to NO.

--------------------- RC/M Global Changes --------------------- yy/mm/dd hh:mm
COMMAND ===>                                                  SCROLL ===> CSR

SET NAME ===> gcname       SHARE OPTION ===> U
CREATOR  ===> creator      DESCRIPTION  ===>

CODE          CHANGE DESCRIPTION     FROM                   TO
TS            TABLESPACE
TSNM          _ NAME                 __________________     __________________
TSDB          _ DBNAME               __________________     __________________
TSCR          _ CREATOR              __________________     __________________
TSCB          _ CREATED BY           __________________     __________________
.
.
.
.
TSPN          _ PAGENUM              __________________     __________________
TSDS          _ DSSIZE               __________________     __________________
TSD2          _ PBR2_DSSIZE          __________________     __________________
TSD3          _ PBR2_PART_DSSIZE     __________________     __________________
TSTM          _ TRACKMOD             __________________     __________________
TSLG          _ LOG                  __________________     __________________
TSMC          _ MEMBER CLUSTER       __________________     __________________
TSDF          _ DEFINE               *                      NO
TSMP          _ MAXPARTITIONS        __________________     __________________

and for indexes

CODE          CHANGE DESCRIPTION     FROM                   TO
IX            INDEX
IXNM          _ NAME                 __________________     __________________
IXCR          _ CREATOR              __________________     __________________
IXCB          _ CREATED BY           __________________     __________________
.
.
.
.
IXCP          _ COPY                 __________________     __________________
IXDF          _ DEFINE               *                      NO
IXDR          _ DEFER                __________________     __________________
IXCO          _ COMPRESS             __________________     __________________
IXD2          _ PBR2_DSSIZE          __________________     __________________
IXD3          _ PBR2_PART_DSSIZE     __________________     __________________


The Global Change set is selected as normal at analysis time.

In the Analysis output it will be seen like this:

--Global Changes:
--
--  SET NAME          ===> creator
--  SET CREATOR       ===> gcname
--
--  CODE   DESCRIPTION
--  AL     ALL OBJECT TYPES
--  ALCB    CREATED BY
--   FROM *                                 TO authid1
--  ALCR    CREATOR
--   FROM *                                 TO authid1
--
--  TSDF    DEFINE
--   FROM *                                 TO NO
--
--  IXDF    DEFINE
--   FROM *                                 TO NO
--


A sample of a create tablespace and Index statements:

-- dbname.tsname WILL BE CREATED VIA THESE NATIVE DB2 COMMANDS.


    SET CURRENT SQLID = 'authid1';


CREATE  TABLESPACE tsname
      IN dbname
           DEFINE NO
      USING STOGROUP stogroup
                                    PRIQTY 12
                                    SECQTY 12
                                    ERASE NO
           FREEPAGE 0
           PCTFREE 5  FOR UPDATE 0
           BUFFERPOOL BP0
           LOCKSIZE ANY
           CLOSE NO
           SEGSIZE 64
           LOCKMAX 0
           CCSID EBCDIC
    ;

.SYNC 15        'CREATE TABLESPACE tsname'
.
.
.
-- authid1.ixname WILL BE CREATED VIA THESE NATIVE DB2 COMMANDS.

    SET CURRENT SQLID = 'authid1';

CREATE  UNIQUE INDEX authid1.ixname ON authid1.table
        ( ROLE_ID ASC
          )
           DEFINE NO
      USING STOGROUP stogroup
                                    ERASE NO
           FREEPAGE 0
           PCTFREE 10
           BUFFERPOOL BP0
           CLOSE YES
           PIECESIZE 2G
    ;

.SYNC 25        'CREATE INDEX authid1.ixname'

Additional Information

Create and Maintain Global Changes