Don't want to rollforward

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mycita
    New Member
    • Mar 2008
    • 5

    Don't want to rollforward

    Hello,

    This is a newbie question on an old db.

    In DB2 (v7.2) logretain and trackmod are turned on.

    Backup schedule is full offline backup, on Sunday, and incremental backups on all other days.

    I want to restore a backup without rolling forward (scenario says that I've lost the log files). I tried the following command:

    [HTML]db2 restore db TEST incremental automatic from g:\backup taken at 20080303100000 to f: into TEST without rolling forward[/HTML]

    Which results in a msg that says a roll forward is required following the restore and nothing happens!

    If the without roll forward key words are not available in v7 then what do I use??

    Any ideas?

    Thanks
  • docdiesel
    Recognized Expert Contributor
    • Aug 2007
    • 297

    #2
    Hi,

    try a
    Code:
    ROLLFORWARD DATABASE mydb COMPLETE  (or STOP, it's the same)
    This completes the rollforward recovery process by rolling back any incomplete transactions and turning off the rollforward pending state of the database.

    Regards,

    Bernd

    Comment

    • mycita
      New Member
      • Mar 2008
      • 5

      #3
      Bernd,

      Thanks for the quick reply.

      db2 rollforward db cdctest complete and db2 rollforward db cdctest stop resulted in: [HTML]SQL1276N Database "TEST" cannot be brought out of rollforward pending state until roll-forward has passed a point in time greater than or equal to "2008-03-06-18.11.17.000000 ", because node "0" contains information later than the specified time.[/HTML]

      So that's what I did and it worked.

      Does that mean the 'With rolling forward' is not available in v7 or that something quirky is going on?

      By the same token what is wrong with this:

      Code:
      G:\>db2 backup db TEST online incremental to h:\backup\test include logs
      SQL0104N  An unexpected token "include" was found following "<identifier>".
      Expected tokens may include:  "END-OF-STATEMENT".  SQLSTATE=42601
      Thank you again!
      Last edited by mycita; Mar 6 '08, 06:34 PM. Reason: typo

      Comment

      • docdiesel
        Recognized Expert Contributor
        • Aug 2007
        • 297

        #4
        Hi,

        as far as I remember there was a "without rolling forward" in v 7.2, but no "backup ... include logs". The latter one was introduced within some v8 DB2. Quiet a time ago that I last used v7.

        Doing online backups always forces a rollforward when restoring the db because when taking the backup the db was inconsistent. This leads to the fact that you need the logs that were "online" (in use) when the db was backuped.

        There's the possibility to migrate the logs to a safe place once they are offline, means closed. DB2 brings some examples of this so called "userexit" with itself in C code, for compiling and using e.g. TSM for storing the logs. This userexit also automatically fetches the logs when restoring the db. I tried this with v7.2 and it worked fine.

        Another possibility should be the "secondlogp ath" setting, but I never tried this one.

        Regards,

        Bernd

        Comment

        • mycita
          New Member
          • Mar 2008
          • 5

          #5
          Thanks for the time and advise

          Comment

          Working...