DB2 - Problem description
Problem IT05887 | Status: Closed |
AMT. OPTION REDIRECT FAILS ON TABLES IF PRIMARY INDEX INCLUDES ALL TABLE COLUMNS | |
product: | |
DB2 FOR LUW / DB2FORLUW / A10 - DB2 | |
Problem 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 | |
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. * **************************************************************** | |
Local Fix: | |
Solution | |
First fixed in DB2 v10.1 Fix Pack 5 | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 03.12.2014 13.07.2015 10.09.2015 |
Problem solved at the following versions (IBM BugInfos) | |
9.7.FP10, 9.7.FP10 | |
Problem solved according to the fixlist(s) of the following version(s) | |
10.1.0.5 |