RC/Migrator for Db2 Global Changes for Triggers and what they affect
search cancel

RC/Migrator for Db2 Global Changes for Triggers and what they affect

book

Article ID: 136918

calendar_today

Updated On:

Products

RC/Migrator for DB2 for z/OS

Issue/Introduction

An in place RC/Migrator for Db2 for z/OS (RCM) Quick Migration is done to copy objects to a new Creator and Database (ALDB and ALCR). 
Although ALCR was specified the Creator of the Trigger is not getting changed,  which causes the -601.

What other Global Changes are needed? 


Error on execution of initial strategy: 

SQLCODE = -601 ERROR; THE NAME (VERSION OR VOLUME SERIAL NUMBER) OF THE OBJECT TO BE DEFINED OR THE TARGET OF A RENAME
STATEMENT IS IDENTICAL TO THE EXISTING (NAME OR VOLUME SERIAL NUMBER) 

xxxx.TRIGGER1 OF THE OBJECT TYPE TRIGGER

 

Example:

CREATE TRIGGER xxxx.TRIGGER1

           AFTER INSERT

           ON xxxx.table

           FOR EACH ROW MODE DB2SQL

      NOT SECURED

 

UPDATE xxxx.table SET COL4 = 'TRIGGER' WHERE COL1 = 'A2' ;

Resolution

To change all references of xxxx to yyyy on this trigger the following Global Changes are needed:

 

-   TGSC    SCHEMA

--      FROM xxxx                             TO yyyy

--  TGTO    TBOWNER

--      FROM xxxx                             TO yyyy

--  TGTC    TEXT T/V CREATOR

--      FROM xxxx                             TO yyyy

 

Result:

CREATE TRIGGER yyyy.TRIGGER1   <<<< Schema

           AFTER INSERT

           ON yyyy.table     <<<<<<<<<< TBOWNER or ALCR

           FOR EACH ROW MODE DB2SQL

      NOT SECURED

 

UPDATE yyyy.table SET COL4 = 'TRIGGER' WHERE COL1 = 'A2' ;  <<<<<<<<< Text T/V Creator