DB2 - Problem description
Problem IT04097 | Status: Closed |
AMT. OPTION REDIRECT FAILS ON TABLES IF PRIMARY INDEX INCLUDES ALL TABLE COLUMNS | |
product: | |
DB2 FOR LUW / DB2FORLUW / A50 - 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 * **************************************************************** * PROBLEM DESCRIPTION: * * See Problem Description above. * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 Version 10.5 Fix Pack 5 * **************************************************************** | |
Local Fix: | |
Solution | |
First fixed in Version 10.5 Fix Pack 5 | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 29.08.2014 10.09.2015 10.09.2015 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) | |
10.5.0.5 |