Recovering Db2 without creating a gap in the active log

You can do a cold start without creating a gap in the log. Although this approach does eliminate the gap in the physical log record, you cannot use a cold start to resolve the logical inconsistencies.

Procedure

To recover without creating a gap in the active log:

  1. Locate the last valid log record by using the DSN1LOGP utility to scan the log.
    Message DSN1213I identifies the last valid log RBA.
  2. Identify the last RBA that is known to be valid by examining message DSN1213I.
    For example, if message DSN1213I indicates that the last valid log RBA is X'89158', round this value up to the next 4-KB boundary, which in this example is X'8A000'.
  3. Create a conditional restart control record (CRCR).
    For example:
    CRESTART CREATE,STARTRBA=8A000,ENDRBA=8A000
  4. Start Db2 with the START DB2 ACCESS(MAINT) command until data is consistent or page sets are stopped.
  5. Take image copies of all data for which data modifications were recorded beyond the log RBA that was used in the CRESTART statement (in this example, X'8A000'). If you do not know what data was modified, take image copies of all data.

    If you do not take image copies of data that has been modified beyond the log RBA that was used in the CRESTART statement, future RECOVER utility operations might fail or result in inconsistent data.

What to do next

After restart, resolve all inconsistent data as described in Resolving inconsistencies resulting from a conditional restart.