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 > why is Roll-forward required after Restore (was "I need help!!! urgent!")

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-10-06, 10:40
achiola achiola is offline
Registered User
 
Join Date: May 2002
Location: General Deheza, Cba, Arg.
Posts: 273
why is Roll-forward required after Restore (was "I need help!!! urgent!")

Hi,
ok. I have a db2 8.0.2 (in win 2000 sp 4)
Today, a db crash...
When I restore the db:
db2 => RESTORE DATABASE DWCORP FROM "F:\BACKUP" TAKEN AT 20060709054511 WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1 WITHOUT ROLLING FORWARD

Message:
SQL2537N Roll-forward is required following the Restore.

Question:
Why?!!!
I can restore without rollfoward?

When I Can restore and roll FORWARD:
db2 => ROLLFORWARD DATABASE DWCORP to end and COMPLETE
SQL0104N An unexpected token "and" was found following "END". Expected
tokens may include: "OF". SQLSTATE=42601
db2 => ROLLFORWARD DATABASE DWCORP TO END OF LOGS AND COMPLETE
SQL4970N Roll-forward recovery on database "DWCORP" cannot reach the
specified stop point (end-of-log or point-in-time) because of missing log
file(s) on node(s) "0".

Please help me.
TIA
Abel.
Reply With Quote
  #2 (permalink)  
Old 07-10-06, 10:51
cchattoraj cchattoraj is offline
Registered User
 
Join Date: Mar 2003
Posts: 343
do both

list history backup

and

rollforward database query status.

This should tell you which logs files you are missing. If you need to rollforward to the end of logs, you need to find the missing log file/s. If not do a roll forward to a Point in time to which you have log files for.
Reply With Quote
  #3 (permalink)  
Old 07-10-06, 10:59
achiola achiola is offline
Registered User
 
Join Date: May 2002
Location: General Deheza, Cba, Arg.
Posts: 273
list history backup all for dwcorp:

Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log Backup ID
-- --- ------------------ ---- --- ------------ ------------ --------------
B D 20060709054511001 N D
----------------------------------------------------------------------------
Contains 8 tablespace(s):

00001 SYSCATSPACE
00002 USERSPACE1
00003 TBFACTS
00004 TBINDEX
00005 TBATTRIB
00006 TBLOB
00007 TBEXTRACCION
00008 SYSTOOLSPACE
----------------------------------------------------------------------------
Comment: DB2 BACKUP DWCORP ONLINE
Start Time: 20060709054511
End Time:
Status: A
----------------------------------------------------------------------------
EID: 170944 Location: F:\BACKUP\DWCORP.0\DB2INST1\NODE0000\CATN0000\2006 0709




rollforward database query status:

Rollforward Status

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

Node number = 0
Rollforward status = DB working
Next log file to be read = S0244606.LOG
Log files processed = -
Last committed transaction = 2006-07-03-04.48.08.000000


any idea?
Thanks?
Reply With Quote
  #4 (permalink)  
Old 07-10-06, 11:05
achiola achiola is offline
Registered User
 
Join Date: May 2002
Location: General Deheza, Cba, Arg.
Posts: 273
when I make the backup, I use this command:
BACKUP DATABASE MSTRMD ONLINE TO "F:\BACKUP\" COMPRESS INCLUDE LOGS

I delete the log, but, I include the log in the backup, now I can get the log for this? how get this?
Reply With Quote
  #5 (permalink)  
Old 07-10-06, 12:52
cchattoraj cchattoraj is offline
Registered User
 
Join Date: Mar 2003
Posts: 343
You need to call IBM support asap. When it's all done, please share your restore-rollforward experience with us on this thread. I am unsure of this, but I seem to recall that include logs did not work well in the early releases of V8. I hope I'm wrong.

You should never delete logs for online backups.

If you can't find the log/s you may want to rollforward to a point in time. You will need the log which goes upto that consistent point in time though.

Good Luck!
Reply With Quote
  #6 (permalink)  
Old 07-10-06, 13:32
achiola achiola is offline
Registered User
 
Join Date: May 2002
Location: General Deheza, Cba, Arg.
Posts: 273
thanks cchattoraj.
I can recovery the log from the db2backup.
With this command:
RESTORE DATABASE DWCORP FROM "F:\BACKUP" TAKEN AT 20060708054509 LOGTARGET "F:\BACKUP\DWCORP.0\DB2INST1\NODE0000\CATN0000\200 60709" WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1 WITHOUT PROMPTING;

I can recovery the log file. and now can rollfoward the db.

Thanks again.
Abel.
Reply With Quote
  #7 (permalink)  
Old 07-10-06, 17:25
cchattoraj cchattoraj is offline
Registered User
 
Join Date: Mar 2003
Posts: 343
Great! Thanks for sharing the log restore command.
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