Pages

Friday, July 26, 2019

Fixing DB2 Index Errors

Incident: Index error when DB2 loads a table.

Steps:

  1. REORG INDEX - this was successful but did not fix index error
  2. REORG TABLE - UNLOAD went ok, LOAD was had error
  3. DROP INDEX - failed because index is used as PRIMARY KEY
  4. ALTER TABLE and DROP PRIMARY KEY - successful
  5. DROP INDEX - successful
  6. LOAD TABLE REPLACE - successful
  7. Defined VSAM data set for INDEX
  8. CREATE INDEX - index error
  9. Sorted unload records and found there were duplicate records. How these got there is anyone's guess.
  10. SORTED records and removed duplicate records
  11. LOAD TABLE REPLACE again using file with unique records
  12. CREATE INDEX - successful
  13. ALTER TABLE CREATE PRIMARY KEY - successful

No comments:

Post a Comment

Total Pageviews