Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2004
    Posts
    3

    Unanswered: restore to a new database

    Hi,
    We just established DB2 shop. Need help in implementing a standby database. I am thinking of taking a weekly backup image and use user exit program to copy the log files. In case of hardware disaster i want to restore the backup image to the new box and apply the log files. I am testing this now, i am able to restore the backup image but unable to apply the log files. used the following command.
    db2 "rollforward database testp OVERFLOW LOG PATH (/mnt/dsk2/backup/LOGS)"

    It comes out with the following message.

    Rollforward Status

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

    Node number = 0
    Rollforward status = DB pending
    Next log file to be read = S0000000.LOG
    Log files processed = -
    Last committed transaction = 2003-12-23-13.12.35.000000

    It didnot apply any log files.
    Please let me know where I am doing wrong. I think it is something to do with the "Next log file to be read".
    Thanks
    gg

  2. #2
    Join Date
    Jun 2003
    Posts
    77

    Re: restore to a new database

    The rollforward operation will be in pending state till you add in the command "and complete" phrase. Stop/Complete both are supposed to do the same. So if you give the command -
    "rollforward database testp to end of logs and complete OVERFLOW LOG PATH (/mnt/dsk2/backup/LOGS)" , it should work.


    Originally posted by githareddyg
    Hi,
    We just established DB2 shop. Need help in implementing a standby database. I am thinking of taking a weekly backup image and use user exit program to copy the log files. In case of hardware disaster i want to restore the backup image to the new box and apply the log files. I am testing this now, i am able to restore the backup image but unable to apply the log files. used the following command.
    db2 "rollforward database testp OVERFLOW LOG PATH (/mnt/dsk2/backup/LOGS)"

    It comes out with the following message.

    Rollforward Status

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

    Node number = 0
    Rollforward status = DB pending
    Next log file to be read = S0000000.LOG
    Log files processed = -
    Last committed transaction = 2003-12-23-13.12.35.000000

    It didnot apply any log files.
    Please let me know where I am doing wrong. I think it is something to do with the "Next log file to be read".
    Thanks
    gg

  3. #3
    Join Date
    Jan 2004
    Posts
    3

    Re: restore to a new database

    Thanks for the reply preetim. It worked.
    Now i am getting following error. I want to stop rollforward at this stage and want to use the DB. Can you please let me know what to do next.


    SQL1268N Roll-forward recovery stopped due to error "24" while retrieving log
    file "S0000018.LOG" for database "TESTP" on node "0".

    Thanks

  4. #4
    Join Date
    Jun 2003
    Posts
    77

    Re: restore to a new database

    Looks like your roll forward needs S00000018.LOG file which is damaged or not found in your log path. You can check if this log file is present in your log path or not. Try to make it available.
    Otherwise, instead of roll forward to end of logs, you can specify certain time up to which the log files are present in your log path.
    Hope it helps.

    Originally posted by githareddyg
    Thanks for the reply preetim. It worked.
    Now i am getting following error. I want to stop rollforward at this stage and want to use the DB. Can you please let me know what to do next.


    SQL1268N Roll-forward recovery stopped due to error "24" while retrieving log
    file "S0000018.LOG" for database "TESTP" on node "0".

    Thanks

  5. #5
    Join Date
    Jun 2003
    Posts
    77

    Re: restore to a new database

    Rolling forward up to certain time may not work now in your current scenario since you've already attempted to rollforward till end of logs.
    If you were just doing it for testing purpose, you can start over again and do a roll forward up to a point in time.


    Originally posted by preetim
    Looks like your roll forward needs S00000018.LOG file which is damaged or not found in your log path. You can check if this log file is present in your log path or not. Try to make it available.
    Otherwise, instead of roll forward to end of logs, you can specify certain time up to which the log files are present in your log path.
    Hope it helps.

  6. #6
    Join Date
    Jan 2004
    Posts
    3
    Thanks for the info.
    gg

Posting Permissions

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