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 > Rollforward on DB fails

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-10-07, 20:46
db2user db2user is offline
Registered User
 
Join Date: Dec 2002
Posts: 123
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!
Reply With Quote
  #2 (permalink)  
Old 12-10-07, 21:15
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #3 (permalink)  
Old 12-10-07, 23:25
db2user db2user is offline
Registered User
 
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?
Reply With Quote
  #4 (permalink)  
Old 12-10-07, 23:45
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #5 (permalink)  
Old 12-11-07, 01:14
db2user db2user is offline
Registered User
 
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 01:25.
Reply With Quote
  #6 (permalink)  
Old 12-11-07, 10:46
db2user db2user is offline
Registered User
 
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".
Reply With Quote
  #7 (permalink)  
Old 12-11-07, 12:29
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Make sure that the instance owner has full access to the files in /home/db2inst1/logs
Reply With Quote
  #8 (permalink)  
Old 12-11-07, 12:59
db2user db2user is offline
Registered User
 
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 13:06.
Reply With Quote
  #9 (permalink)  
Old 12-18-07, 12:39
anu_chiluka anu_chiluka is offline
Registered User
 
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.
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