Results 1 to 9 of 9
  1. #1
    Join Date
    Dec 2002
    Posts
    123

    Unanswered: Rollforward on DB fails

    Hello,

    I have an interesting problem...I'm trying to put the full backup image of our productions server DB on our development server. The online backup image was created with the log files as a part of it using this command :

    db2 backup database bkdb online to /BKDATA/backup include logs

    On our development server, I run the restore command which executes successfully..

    db2 restore db bkdb from /home/db2inst1/backup/ taken at 20071103060002 logtarget /home/db2inst1/logs
    DB20000I The RESTORE DATABASE command completed successfully.

    Under /home/db2inst1/logs I see three log files :

    S0021154.LOG S0021155.LOG S0021156.LOG

    Now, when I give the rollforward command I get this error:

    db2 rollforward db bkdb to end of logs and stop overflow log path \(/home/db2inst1/logs\)
    SQL4970N Roll-forward recovery on database "BKDB" cannot reach the
    specified stop point (end-of-log or point-in-time) because of missing log
    file(s) on node(s) "0".


    If I give the query status command I get this :

    db2 rollforward database bkdb query status

    Rollforward Status

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

    Node number = 0
    Rollforward status = DB working
    Next log file to be read = S0021154.LOG
    Log files processed = -
    Last committed transaction = 2007-10-07-14.14.16.000000



    I'm so confused.. it seems like it has all the log files it needs...since their off the backup image itself.. I have tried this on another database server with no issues at all.. .any idea why this is happening? how can i fix it so as to get the db out of pending state?

    Thanks!

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Instead of rollforward to end of logs, try rollforward to the minimum roll forward time. To get the minimum roll forward time, use 2000-01-01-00.00.00.000000 and DB2 will tell you the minimum roll forward time, and then resubmitt the command.

    And one more thing (and this is important), use the "NORETRIEVE" option on the end of the rollforward command (see the manual).
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Dec 2002
    Posts
    123
    Thanks for the quick reply! I tried the rollforward with a date and noretrieve..it seems like our db requires a rollforward to the end of logs... no luck!

    db2 rollforward db bkdb to 2000-01-01-00.00.00.000000 and stop overflow log path \(/home/nrg1/logs\) noretrieve
    SQL1274N The database "BKDB" requires roll-forward recovery and the
    point-in-time must be to the end of logs.


    One thing is that today I tried a restore with an image dated 11/22/07 (which was successful but then the rollforward failed so I thought maybe the image was corrupt), then 11/03/07 (the one I'm trying out now). Could this have to do with it? I'm fairly certain nothing is wrong with both images. I don't think it should matter since it should replace the backup images and then use the logs from the image itself correct?

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    I think the problem is that you already specified end of logs, and you cannot change that without another restore. Try to use end of logs with noretrieve option.

    If that does not work, then do restore and rollforward all over again (using minimum rollforward time and noretrieve).
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  5. #5
    Join Date
    Dec 2002
    Posts
    123
    Thanks again.. I tried end of logs with noretrieve...no luck with that either. I've scheduled another restore with the same backup image ( that is the second one I tried from 11/03)...and will try to give the minimum rollforward time/noretrieve option with the rollforward this time...as far as I remember, giving the minimum date/time has never worked for me on the db.. probably because I would always give this option after 'end of logs' failed?

    I just remember that before doing all of the restores with correct backup images,... about a week or two ago a restore failed on the same db since that image was truely corrupt. Is it possible that this has caused all of these problems I'm facing? Maybe a reinstall of the db will need to be done in this case. Just a guess...since it's baffling!
    Last edited by db2user; 12-11-07 at 02:25.

  6. #6
    Join Date
    Dec 2002
    Posts
    123
    Hello again,

    Well this is what I tried today...any idea what's going on?

    First I gave :

    db2 rollforward db bkdb to 2000-01-01-00.00.00.000000 and stop overflow log path \(/home/db2inst1/logs\) noretrieve
    SQL1275N The stoptime passed to roll-forward must be greater than or equal to
    "2007-11-03-06.53.05.000000", because database "BKDB" on node(s) "0"
    contains information later than the specified time.

    Then I tried this :

    db2 rollforward db bkdb to 2007-11-03-06.53.05.000000 and stop overflow log path \(/home/db2inst1/logs\) noretrieve
    SQL4970N Roll-forward recovery on database "BKDB" cannot reach the
    specified stop point (end-of-log or point-in-time) because of missing log
    file(s) on node(s) "0".

  7. #7
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Make sure that the instance owner has full access to the files in /home/db2inst1/logs
    ---
    "It does not work" is not a valid problem statement.

  8. #8
    Join Date
    Dec 2002
    Posts
    123
    Hi..just checked... it's def. not a permission problem...thx. We are going to do a reinstall.. I think I've messed up the image by restoring from a corrupt one in the past. Will start from scratch again..
    Last edited by db2user; 12-11-07 at 14:06.

  9. #9
    Join Date
    Dec 2006
    Posts
    17
    I would suggest to try the below options
    1) While using the "to isotime" option also use "using local time" to eliminates potential errors due to the translation of local to GMT time.

    2) Use recover database command that will perform both restore and rollforward.

Posting Permissions

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