Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2004
    Posts
    64

    Answered: DB2 LUW online backup restore to circular logged database

    Hi All,

    DB2 LUW 10.5 on Linux.

    We have requirement to restore a production backup taken online to a test database which has circular logging. It is failing in rollforward step as it keeps looking for log files in TSM. There is no TSM in test system and only used in Prod.

    The manual says Rollforward can't be done on a circular logged db with logarchmeth as OFF. But an online backup can't be restored without ROLLFORWARD. So is this a contradiction which can't be resolved?

    Will it be okay if I temporarily enable log archival in test system so that rollforward will work (just for the restore sake) and then disable after the restore?

    Thanks in advance for any ideas.

    Regards,

    Amar

  2. Best Answer
    Posted by mark.b

    "Add the NORETRIEVE option at the end of your ROLLFORWARD command."


  3. #2
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    Hi Amar,

    DB2 backup image for a single node recoverable database usually (they are placed into the backup image by default) contains all the transaction logs needed to rollforward the database to the end of backup.
    So, use the "LOGTARGET somedir" option of the RESTORE command. Then use this somedir directory in the OVERFLOW LOG PATH option of the ROLLFORWARD command.
    Finally, you can switch off the log archiving mode for your database.
    Regards,
    Mark.

  4. #3
    Join Date
    Apr 2004
    Posts
    64
    Hi Mark,

    I have tried that. But during rollforward, it shows the following error.

    SQL1268N Rollforward recovery processing has stopped because of error
    "SQL2033" while retrieving log file "xxxxx.LOG" for database "xxxx" on
    database partition "0" and log stream "0".

    (I have masked the log file name and dbname above)

    I have checked the "somedir" as you stated above, and that doesn't contain this log file. In the error above it's looking for log file S1112.log but in backup I have only s1111.log. Basically it's looking for the next log file.

    I manual, on ROLLFORWARD it says the following,

    The database must be recoverable (that is, the logarchmeth1 or logarchmeth2
    database configuration parameters must be set to a value other than OFF) before
    the database can be recovered with rollforward recovery.


    And we had this error after the logarchival was changed from TSM to OFF here. The same backup was restored to other dbs successfully where we have archival is set to TSM.

    So I am wondering if it's technically not allowed to restore an online backup to a db where archival is turned off and hence rollforward is not allowed.

    Regards,
    Amar

  5. #4
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    Add the NORETRIEVE option at the end of your ROLLFORWARD command.
    Regards,
    Mark.

  6. #5
    Join Date
    Apr 2004
    Posts
    64
    Many Thanks Mark!

    That really worked. I understand why as well. Thanks again!

Posting Permissions

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