Technote

(troubleshooting)
SQL0803N One or more values in the INSERT statement Stagingprop fails
Problem(Abstract)
Your Stagingprop utiltiy fails when propagating data to the production database. The reason for failure is a database error similar to:

SQL0803N One or more values in the INSERT statement,
UPDATE statement, or foreign key update caused by a DELETE statement are
not valid because the primary key, unique constraint or unique index
identified by "2" constrains table "DB2ADMIN.INITIATIVE" from having
duplicate rows for those columns. SQLSTATE=23505
Symptom
Consider the following scenario, where each update is recorded by table and primary key value in STAGLOG:

Update INITIATIVE table (key = 1, Unique Index = A)
Update INITIATIVE table (key = 2, Unique Index = B)
Update INITIATIVE table (key = 1, Unique Index = C)
Update INITIATIVE table (key = 2, Unique Index = A)
Update INITIATIVE table (key = 1, Unique Index = B)

Prior to running stagingprop, take the example where the production database has two entries in the INITIATIVE table:

key = 1, Unique Index = A
key = 2 Unique Index = B

When running stagingprop, we will try to update the unique index of key = 1 to a value of B. However, on production, key = 2 already has the unique index value = B.
Cause Earlier versions of the stagingprop utility to not properly handle changes to unique indexes, but rather only primary keys. As a result, unique index constraints are violated against the production database when performing the sequence of operations recorded on the staging database. Resolving the problem This problem (APAR SI27143) is resolved in Fix Pack 6.0.0.3 or newer in version 6.0 and Fix Pack 5.6.1.3 in version 5.6.1. The fix contains the new version of the tool to handle the scenario. You can obtain the Fix Packs or newer from the WebSphere Commerce Fixes by version page.
Cross Reference information
Segment Product Component Platform Version Edition
Commerce WebSphere Commerce Enterprise Utilities/Tools AIX, Linux, Solaris, Windows 6.0
Commerce WebSphere Commerce Business Edition Utilities/Tools AIX, Linux, Solaris, Windows 5.6, 5.6.1
Commerce WebSphere Commerce - Express Utilities/Tools Linux, Windows 5.6, 5.6.1, 6.0
Commerce WebSphere Commerce Developer Enterprise Utilities/Tools Windows 6.0
Commerce WebSphere Commerce Developer Business Edition Utilities/Tools Windows 5.6, 5.6.1
Commerce WebSphere Commerce Developer Professional Edition Utilities/Tools Windows 5.6, 5.6.1, 6.0
Commerce WebSphere Commerce Developer Express Utilities/Tools Windows 5.6, 5.6.1, 6.0
   

Document Information

Current web document: http://www.ibm.com/support/docview.wss?uid=swg21269830