IBM Support

IT04111: AMT. OPTION REDIRECT FAILS ON TABLES IF PRIMARY INDEX INCLUDES ALL TABLE COLUMNS

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • AMTs after insert merge redirect trigger tries to update on
    match all target columns, expect the index columns.
    Sequence in error is:
    
    db2 "create table test.t1 (c int not null primary key)"
    db2 "CALL SYSPROC.ADMIN_MOVE_TABLE( 'TEST','T1', '', '', '', '',
    '', '', '','','INIT')"
    db2 "CALL SYSPROC.ADMIN_MOVE_TABLE( 'TEST','T1', '', '', '', '',
    '', '', '','','COPY')"
    db2 "CALL SYSPROC.ADMIN_MOVE_TABLE( 'TEST','T1', '', '', '', '',
    '', '', '','','REDIRECT,TRACE')"
    
    SQL0104N  An unexpected token ")" was found following "HED THEN
    UPDATE SET(".
    Expected tokens may include:  "<update_target_list>".
    SQLSTATE=42601
    
    bad trigger is:
    
    CREATE OR REPLACE TRIGGER "TEST"."T1AAAAVxi" AFTER INSERT ON
    "TEST"."T1" REFERENCING NEW AS i FOR EACH ROW
    BEGIN ATOMIC
      DELETE FROM "TEST"."T1AAAAVxs" t WHERE (t."C"=i."C");
      MERGE INTO "TEST"."T1AAAAVxt" AS t
      USING TABLE(VALUES(i."C"))s("C")
      ON (t."C"=s."C")
      WHEN NOT MATCHED THEN INSERT("C")VALUES(s."C")
      WHEN MATCHED THEN UPDATE SET()=();
    END
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All DB2 V9.7 users.                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 V9.7 Fix Pack 10, or higher.                  *
    ****************************************************************
    

Problem conclusion

  • First fixed in DB2 V9.7 Fix Pack 10
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT04111

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-08-30

  • Closed date

    2014-12-22

  • Last modified date

    2014-12-22

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    IT05887

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R970 PSN

       UP

  • R970 PSY

       UP



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.7

Reference #: IT04111

Modified date: 22 December 2014