Regenerating missing identity column values

You can regenerate missing identity column values.

Procedure

To regenerate missing identity column values:

  1. Begin general-use programming interface information.Choose a starting value for the identity column with the following ALTER TABLE statement:
    ALTER TABLE table-name 
     ALTER COLUMN identity-column-name
     RESTART WITH starting-identity-value
    End general-use programming interface information.
  2. Run the REORG utility to regenerate lost sequence values.

    If you do not choose a starting value in step 1, the REORG utility generates a sequence of identity column values that starts with the next value that Db2 would have assigned before the recovery.