Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2004
    Location
    Karachi,pakistan
    Posts
    17

    Unanswered: error:: roll-forward pending state

    i am trying restrore the database from online backup image....below are the steps i am doing:
    1. create a database on other machine having same name of that backup database.
    2. restore the databse...and its done successfully
    3. now when trying to access DB is gives me an error ;that "roll-forward pending state"
    4. i roll-forward the DB ....and its done successfully
    5. but still i m getting the same error that ;in roll-forward pending state!!!

    wats wrong i m doing here???? i did it before as well....that its fine with me...dunoo wats wrong now!!!

    kindly tell me do i need some logs files ???l...if needed...so wats are those???
    A.Dee

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    If you are restoring an on-line backup, you need the log files from the system backed up. Is there anyway you can take another backup, this time off-line?
    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
    Jan 2004
    Location
    Karachi,pakistan
    Posts
    17
    Marcus_A,thanx for your response!

    as u said log files are required for online backup....Ok!...so kindly tell me what log file i needed??? (coz i dunoo more about DB2).

    i am on win2000 and have DB2 UDB 7.1!

    tell me,may i suppose to copy any file from this dir:
    D:\DB2\NODE0000\SQL00002 (...file present here include 'db2rhist.asc')

    or from this dir :
    D:\DB2\NODE0000\SQL00002\SQLOGDIR (...so many logs are here..)

    also one thing more...before i run RESTORE, may i suppose to update any configuration PARAS of the databse ???

    ...why are u asking for off-line backup???...for any checking perpose?? or what?

    kindly do a favour ...to tell me in details!
    lots of thanx in Advance!
    A.Dee

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    If you run the following command you can get the log file path on the old server where the logs you need should be located. Note that if you are using archive logging, the archived logs may have been moved.

    db2 get db config for database-name

    Then you will see:

    Path to log files = path

    When you move the logs to the new server, you can also use the NEWLOGPATH directory command in the restore if necessary to specify where to find the log files if the path is different on the new server (see the Command Reference). I am not sure if you can reference a shared drive directly on the orginal server (so that you would not have to move any logs). This command only applies to the restore.

    I think there may be a way to find out exactly which log files you need, but I don't know off-hand how to do that.

    I am not sure what you are exactly asking about the database parms, but I would use the parms from the command above on the old server to set the parms on the new database as necessary if they don't get updated from the backup.

    If you use an off-line backup and don't need to roll the logs forward past the backup image, you don't need any logs.
    Last edited by Marcus_A; 06-14-04 at 06:42.
    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
    Jun 2004
    Posts
    5
    Hi,

    You said you are rolling forward the database. What command do you use for that.

    Did you tried this command, " rollforward db <dbname> to end of logs and complete"

    Did you copy online logs before doing rollforward?

    Just do "rollforward db <dbname> query status" it will tell you which log file it requires. Ensure that file is present in the logfile directory of your database and do the rollforward. there is the bug in DB2, if you do the rollforward the db, will tell you it is completed sucessfully even it doesn't rollforard any new logs.

  6. #6
    Join Date
    Jan 2004
    Location
    Karachi,pakistan
    Posts
    17
    done!
    lots of thanx Marcus_A ! and er_maarif as well!

    wat i m doing wrong is not copying the whole log dir...i just pick the last *.log file...and Amaizingly its also giving me msg of "successfully roll-forward" as er_maarif told its a db2 bug.

    Okz! thanx for your all help!
    bye
    A.Dee

Posting Permissions

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