Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655

    Unanswered: How to put database in rollforward pending ?

    Dear friends.

    We have a requirement on our mirror to rollforward the mirror to 5:30pm for today. In production a table was truncated mistakenly. Even though table data was recovered from some live data available, the QA team wants to test this recovered table against data just before the truncation.

    So mirror was restored today morning. How can get existing mirror DB to rollforward to point in time to 5:30pm ??

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    What you will need:

    1) backup image (presumably it is an online back)
    2) log files that go from just before the backup to at least 5:30PM

    What you do:

    1) restore the database
    2) put the log files in the appropriate place (log directory)
    3) issue rollforward to 5:30PM

    Andy

  3. #3
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655
    Thanks,

    I needed to know that previously restored database cannot be carried on to point-in-time in future. Getting logs from production.

    That is not logical either, but is there a kind of trick that once rollforward completed database could be put into rollforward state and the rollforward further to 5:30 pm. I need only one table which is in one tablespace.

    Regards

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Is it an offline or online backup?

    Andy

  5. #5
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655
    Online

    db2v9.5.5 on win2k3

  6. #6
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Your restore command will be like:

    Code:
    restore db MyDB from <directory> takes at <timestamp> to <db directory> into NewMyDB logtarget <directory to place log files> replace existing redirect without prompting
    The redirect is only necessary if you are doing a redirected restore. This will leave the database in a rollforward pending state.

    Then you would rollforward to 5:30PM " AND COMPLETE" to take it out of rollforward pending state.

    Andy

  7. #7
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655
    Rollforward to end of logs clause does not work ? Do we need to specify time?

    I had copied 100 logs in the folder but it did not seem to process even one.

    Any Idea ?


    C:\DBFinder>db2 rollforward database triumph to end of logs tablespace(tsd_client_acc) online overflow log path ('G:\daily_backup\logs')

    Rollforward Status

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

    Node number = 0
    Rollforward status = not pending
    Next log file to be read =
    Log files processed = -
    Last committed transaction = 2010-09-02-08.38.40.000000 UTC

    DB20000I The ROLLFORWARD command completed successfully.

Posting Permissions

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