home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IT04111 Status: Closed

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

product:
DB2 FOR LUW / DB2FORLUW / 970 - 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 V9.7 Fix Pack 10
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
30.08.2014
22.12.2014
22.12.2014
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)
9.7.0.10 FixList