Results 1 to 7 of 7
  1. #1
    Join Date
    May 2002
    Location
    General Deheza, Cba, Arg.
    Posts
    276

    Unanswered: why is Roll-forward required after Restore (was "I need help!!! urgent!")

    Hi,
    ok. I have a db2 8.0.2 (in win 2000 sp 4)
    Today, a db crash...
    When I restore the db:
    db2 => RESTORE DATABASE DWCORP FROM "F:\BACKUP" TAKEN AT 20060709054511 WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1 WITHOUT ROLLING FORWARD

    Message:
    SQL2537N Roll-forward is required following the Restore.

    Question:
    Why?!!!
    I can restore without rollfoward?

    When I Can restore and roll FORWARD:
    db2 => ROLLFORWARD DATABASE DWCORP to end and COMPLETE
    SQL0104N An unexpected token "and" was found following "END". Expected
    tokens may include: "OF". SQLSTATE=42601
    db2 => ROLLFORWARD DATABASE DWCORP TO END OF LOGS AND COMPLETE
    SQL4970N Roll-forward recovery on database "DWCORP" cannot reach the
    specified stop point (end-of-log or point-in-time) because of missing log
    file(s) on node(s) "0".

    Please help me.
    TIA
    Abel.

  2. #2
    Join Date
    Mar 2003
    Posts
    343
    do both

    list history backup

    and

    rollforward database query status.

    This should tell you which logs files you are missing. If you need to rollforward to the end of logs, you need to find the missing log file/s. If not do a roll forward to a Point in time to which you have log files for.

  3. #3
    Join Date
    May 2002
    Location
    General Deheza, Cba, Arg.
    Posts
    276
    list history backup all for dwcorp:

    Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log Backup ID
    -- --- ------------------ ---- --- ------------ ------------ --------------
    B D 20060709054511001 N D
    ----------------------------------------------------------------------------
    Contains 8 tablespace(s):

    00001 SYSCATSPACE
    00002 USERSPACE1
    00003 TBFACTS
    00004 TBINDEX
    00005 TBATTRIB
    00006 TBLOB
    00007 TBEXTRACCION
    00008 SYSTOOLSPACE
    ----------------------------------------------------------------------------
    Comment: DB2 BACKUP DWCORP ONLINE
    Start Time: 20060709054511
    End Time:
    Status: A
    ----------------------------------------------------------------------------
    EID: 170944 Location: F:\BACKUP\DWCORP.0\DB2INST1\NODE0000\CATN0000\2006 0709




    rollforward database query status:

    Rollforward Status

    Input database alias = DWCORP
    Number of nodes have returned status = 1

    Node number = 0
    Rollforward status = DB working
    Next log file to be read = S0244606.LOG
    Log files processed = -
    Last committed transaction = 2006-07-03-04.48.08.000000


    any idea?
    Thanks?

  4. #4
    Join Date
    May 2002
    Location
    General Deheza, Cba, Arg.
    Posts
    276
    when I make the backup, I use this command:
    BACKUP DATABASE MSTRMD ONLINE TO "F:\BACKUP\" COMPRESS INCLUDE LOGS

    I delete the log, but, I include the log in the backup, now I can get the log for this? how get this?

  5. #5
    Join Date
    Mar 2003
    Posts
    343
    You need to call IBM support asap. When it's all done, please share your restore-rollforward experience with us on this thread. I am unsure of this, but I seem to recall that include logs did not work well in the early releases of V8. I hope I'm wrong.

    You should never delete logs for online backups.

    If you can't find the log/s you may want to rollforward to a point in time. You will need the log which goes upto that consistent point in time though.

    Good Luck!

  6. #6
    Join Date
    May 2002
    Location
    General Deheza, Cba, Arg.
    Posts
    276
    thanks cchattoraj.
    I can recovery the log from the db2backup.
    With this command:
    RESTORE DATABASE DWCORP FROM "F:\BACKUP" TAKEN AT 20060708054509 LOGTARGET "F:\BACKUP\DWCORP.0\DB2INST1\NODE0000\CATN0000\200 60709" WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1 WITHOUT PROMPTING;

    I can recovery the log file. and now can rollfoward the db.

    Thanks again.
    Abel.

  7. #7
    Join Date
    Mar 2003
    Posts
    343
    Great! Thanks for sharing the log restore command.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •