If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > error:: roll-forward pending state

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-14-04, 04:25
ADee ADee is offline
Registered User
 
Join Date: Jan 2004
Location: Karachi,pakistan
Posts: 17
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
Reply With Quote
  #2 (permalink)  
Old 06-14-04, 04:29
Marcus_A Marcus_A is online now
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #3 (permalink)  
Old 06-14-04, 05:10
ADee ADee is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 06-14-04, 05:34
Marcus_A Marcus_A is online now
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390

Last edited by Marcus_A; 06-14-04 at 05:42.
Reply With Quote
  #5 (permalink)  
Old 06-14-04, 05:38
er_maarif er_maarif is offline
Registered User
 
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.
Reply With Quote
  #6 (permalink)  
Old 06-14-04, 07:00
ADee ADee is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On