home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Neueste VersionenFixList
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
Haben Sie Probleme? - Kontaktieren Sie uns.
Kostenlos registrieren anmeldung-x26
Kontaktformular kontakt-x26

DB2 - Problembeschreibung

Problem IC65654 Status: Geschlossen

FOR EACH ROW TRIGGER WITH MERGE STATEMENT MAY PRODUCE INCORRECT BEHAVIOUR.

Produkt:
DB2 FOR LUW / DB2FORLUW / 950 - DB2
Problembeschreibung:
The problem happens when all the conditions below are met: 
 
1. There is a MERGE statement used in CREATE TRIGGER statement 
 
with AFTER and FOR EACH ROW clauses. 
 
2. The MERGE statement in (1) is used to specify an alternate 
 
action of UPDATE when conditions are matched or INSERT 
 
otherwise. 
 
3. The UPDATE and INSERT in (2) modify the same table (referred 
 
thereafter as "target table"). 
 
4. Two rows are modified in sequence and the modifications 
 
trigger the TRIGGER statement in (1) in the way that the first 
 
row will 
 
trigger to insert a row to the table in (3) and the second row, 
 
because of having the same value as the first row on the key 
 
column, will trigger to 
 
update the same row that was inserted previously. 
 
 
 
The incorrect behaviour is the second row, instead of triggering 
 
to update,triggers another insert to the target table that may 
 
may result in a duplicate key violation sqlcode SQL0803. 
 
 
 
This problem was first introduced in DB2 Version 9.1 Fix Pack 6.
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* db2v9.5                                                      * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* FOR EACH ROW TRIGGER WITH MERGE STATEMENT MAY PRODUCE        * 
* INCORRECT BEHAVIOUR.                                         * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* upgrade to v9.5fp6                                           * 
****************************************************************
Local-Fix:
The trigger seems to work fine by adding: 
 
"BEGIN and END" clause to the trigger definition.
verfügbare FixPacks:
DB2 Version 9.5 Fix Pack 6a for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 10 for Linux, UNIX, and Windows

Lösung
fixed in db2v9.5
Workaround
keiner bekannt / siehe Local-Fix
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
19.01.2010
31.05.2010
31.05.2010
Problem behoben ab folgender Versionen (IBM BugInfos)
9.5.,
9.5.FP6
Problem behoben lt. FixList in der Version