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 IC85841 Status: Geschlossen

BATCH INSERTS CAUSING DUPLICATE ROWS WHEN USING NULLIDRA (REOPT=ALWAYS) VS.
NULLIDR1 (REOPT=ONCE)

Produkt:
DB2 FOR LUW / DB2FORLUW / A10 - DB2
Problembeschreibung:
Data might become corrupt when performing batch inserts into the 
DB2 database, 
resulting in duplicate data being inserted. 
This affects both Java and non-Java (DB2 Call Level Interface, 
.NET, ODBC)  applications. 
 
To Repro using Java: 
 
(1) Create the table 
db2 "CREATE TABLE db2inst1.t1 ( fieldone INTEGER NOT NULL, 
fieldtwo INTEGER NOT NULL )"; 
db2 "bind db2clipk.bnd collection NULLIDRA"  /* This is 
REOPT=ALWAYS package */ 
db2 "bind db2clipk.bnd collection NULLIDR1" /* This is 
REOPT=ONCE package */ 
db2 connect reset; 
 
(2) Compile the Java test program with the following code and 
ensure 
currentPackageSet=NULLIDRA 
 String 
URL="jdbc:db2://test.ibm.com:50000/SAMPLE:currentPackageSet=NULL 
IDRA;jdbcCollection=NULLIDRA;"; 
 Connection con = DriverManager.getConnection(URL, "db2inst1", 
"secret"); 
 
 String prepString="insert into db2inst1.t1(fieldone, fieldtwo) 
values(?, ?)"; 
 
 PreparedStatement pst = con.prepareStatement (prepString); 
 
     for ( int i=0;i< 5;i++) 
     { 
         pst.setInt(1,i+1); 
         pst.setInt(2,i+2); 
         pst.addBatch(); 
     } 
     pst.executeBatch(); 
     con.close(); 
 
The following is the expected results from running the commands: 
 
$ db2 "select * from db2inst1.t1" 
 
FIELDONE    FIELDTWO 
----------- ----------- 
          1           2 
          2           3 
          3           4 
          4           5 
          5           6 
 
  5 record(s) selected. 
 
 
Instead of receiving these results, the data becomes corrupt, 
resulting in the same 
data being inserted in each row as shown: 
 
$ db2 "select * from db2inst1.t1" 
 
FIELDONE    FIELDTWO 
----------- ----------- 
          1           2 
          1           2 
          1           2 
          1           2 
          1           2 
 
  5 record(s) selected.
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* All users                                                    * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 version 10.1.0.2.                             * 
****************************************************************
Local-Fix:
Use currentPackageSet=NULLIDR1 (JDBC) or Reopt=3 (DB2 CLI)
verfügbare FixPacks:
DB2 Version 10.1 Fix Pack 2 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 6 for Linux, UNIX, and Windows

Lösung
The problem is first fixed in DB2 version 10.1.0.2.
Workaround
keiner bekannt / siehe Local-Fix
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
10.08.2012
07.12.2012
07.12.2012
Problem behoben ab folgender Versionen (IBM BugInfos)
Problem behoben lt. FixList in der Version
10.1.0.2 FixList
10.5.0.2 FixList