Troubleshooting WebSphere Commerce Analyzer: SET INTEGRITY or SET CONSTRAINTS command fails

After the initial replication and extraction, the SET INTEGRITY or SET CONSTRAINTS commands may fail due to violations with the Foreign Key, Primary Key, or Unique Key. The offending rows are placed in mirror tables called Load Exception tables.

Check the Load Exception tables to locate any offending rows by doing the following:

  1. Open a DB2 Command window.
  2. Type the following to list the Load Exception tables: list tables for schema wcaexcpt. The Load Exception table names display.
  3. For each Load Exception table name, type select count (*) from wcaexcpt.tablename , where tablename is one of the Load Exception table names. A number displays. If the number is 0, the table does not have errors. If the number is greater than 0, the table has errors.
  4. If the table has errors type select * fromtablename where tablename belongs to the table with errors. The MSG column indicates the offending row. Correct the Foreign, Primary or Unique Key error.