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-25-11, 09:06
DB_N00b DB_N00b is offline
Registered User
 
Join Date: Jan 2010
Posts: 152
why is Roll-forward required after Restore (was "I need help!!! urgent!")

Hello,

I dont have access to two tablespaces anymore and now i want to restore them because they are in restore pending mode with this command:

RESTORE DATABASE SONL2 TABLESPACE (tablespace1, tablespace2) ONLINE USE TSM OPEN 2 SESSIONS TAKEN AT 20110608153009 WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1 WITHOUT ROLLING FORWARD WITHOUT PROMPTING;


but then this error comes up:

SQL2537N Roll-forward is required following the Restore.

What can I do?
Reply With Quote
  #2 (permalink)  
Old 07-25-11, 09:52
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
if you restore a tablespace it has to be become inline with the information in syscatspace
rollforward is needed to apply changes, executed after the backup was executed
see rollforward commend :
ROLLFORWARD DATABASE
was the access denied to the ts before the restore or why was the restore initiated ?
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #3 (permalink)  
Old 07-25-11, 09:54
DB_N00b DB_N00b is offline
Registered User
 
Join Date: Jan 2010
Posts: 152
hey,

yeah, i have 2 "restore pending" tablespaces ... and thats why i want to restore them ... but i just dont know how to fix this.
Reply With Quote
  #4 (permalink)  
Old 07-25-11, 09:56
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
It can be a "dummy" rollforward - ie, rollforward to the point in time of the backup itself instead of applying changes.

The madotory minimum point in time for rollforward on a tablespace can be found using list tablespaces show detail command .

HTH

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #5 (permalink)  
Old 07-25-11, 09:58
DB_N00b DB_N00b is offline
Registered User
 
Join Date: Jan 2010
Posts: 152
what do you mean with?

do you have an example of a command? the tablespaces names are tablespace1, tablespace2
Reply With Quote
  #6 (permalink)  
Old 07-25-11, 10:02
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Code:
db2 connect to sample
db2 list tablespaces show detail
You will have to look for "Minimum Recovery Time" for the two tablespaces in scope.
After you restore the tablespaces, it is mandatory to rollforward the tablespaces to atleast the time in the above output. Otherwise, your rollforward complete will fail.
This time is to ensure the object information in the tablespaces matches the info in the catalog tables. (eg. a new table creation will change the minimum recovery time)

Restore Database ... Tablespace

HTH
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.

Last edited by sathyaram_s; 07-25-11 at 10:05. Reason: added info
Reply With Quote
  #7 (permalink)  
Old 07-25-11, 10:03
DB_N00b DB_N00b is offline
Registered User
 
Join Date: Jan 2010
Posts: 152
This are the two restore pending tablespaces

Quote:

Tablespace ID = 27
Name = Tablespace1
Type = Database managed space
Contents = All permanent data. Large table space.
State = 0x0100
Detailed explanation:
Restore pending

Tablespace ID = 30
Name = Tablespace2
Type = Database managed space
Contents = All permanent data. Large table space.
State = 0x0100
Detailed explanation:
Restore pending
Reply With Quote
  #8 (permalink)  
Old 07-25-11, 10:04
DB_N00b DB_N00b is offline
Registered User
 
Join Date: Jan 2010
Posts: 152
What do i have to do now? Rollforward them?

db2 " rollforward database db_test tablespace tablespace1 tablespace2 online" ???
Reply With Quote
  #9 (permalink)  
Old 07-25-11, 10:05
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
Sathyaram I agree with you, but you can not specify a timestamp that would create an inconsistent db by specifying a timestamp smaller than another modification committed/available in the database.
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #10 (permalink)  
Old 07-25-11, 10:07
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
if you want to recover all :
rollforward .. tablespace ( tablespace1, tablespace2 ) to end of logs and complete...
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #11 (permalink)  
Old 07-25-11, 10:12
DB_N00b DB_N00b is offline
Registered User
 
Join Date: Jan 2010
Posts: 152
mm i entered this command and it doesnt work ... :-(

Quote:
db2 " rollforward database db_test tablespace (tablespace1,tablespace2) to end of logs and complete"
SQL0104N An unexpected token "to" was found following ")". Expected tokens
may include: "END-OF-STATEMENT". SQLSTATE=42601
Reply With Quote
  #12 (permalink)  
Old 07-25-11, 10:15
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
sorry, but there is always the infocenter for correct syntax
ROLLFORWARD DATABASE
it should be
db2 " rollforward database db_test to end of logs and complete tablespace (tablespace1,tablespace2) online"
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #13 (permalink)  
Old 07-25-11, 10:17
DB_N00b DB_N00b is offline
Registered User
 
Join Date: Jan 2010
Posts: 152
Then there comes this error .... :-((

Quote:


SQL4908N The table space list specified for roll-forward recovery on database
"db_test" is invalid on node(s) "0".
Reply With Quote
  #14 (permalink)  
Old 07-25-11, 10:19
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
then read explanation at this page :
SQL4908N
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #15 (permalink)  
Old 07-25-11, 10:42
DB_N00b DB_N00b is offline
Registered User
 
Join Date: Jan 2010
Posts: 152
Doesnt help much, i even already checked that website .... (
i wouldnt have visited this forum then.
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