Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    Join Date
    Jan 2010
    Posts
    207

    Unanswered: 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?

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    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
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Jan 2010
    Posts
    207
    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.

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    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.

  5. #5
    Join Date
    Jan 2010
    Posts
    207
    what do you mean with?

    do you have an example of a command? the tablespaces names are tablespace1, tablespace2

  6. #6
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    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)

    http://www.dbforums.com/db2/1115334-...ablespace.html

    HTH
    Last edited by sathyaram_s; 07-25-11 at 11:05. Reason: added info
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  7. #7
    Join Date
    Jan 2010
    Posts
    207
    This are the two restore pending tablespaces


    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

  8. #8
    Join Date
    Jan 2010
    Posts
    207
    What do i have to do now? Rollforward them?

    db2 " rollforward database db_test tablespace tablespace1 tablespace2 online" ???

  9. #9
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    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
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  10. #10
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    if you want to recover all :
    rollforward .. tablespace ( tablespace1, tablespace2 ) to end of logs and complete...
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  11. #11
    Join Date
    Jan 2010
    Posts
    207
    mm i entered this command and it doesnt work ... :-(

    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

  12. #12
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    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
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  13. #13
    Join Date
    Jan 2010
    Posts
    207
    Then there comes this error .... :-((



    SQL4908N The table space list specified for roll-forward recovery on database
    "db_test" is invalid on node(s) "0".

  14. #14
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    then read explanation at this page :
    SQL4908N
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  15. #15
    Join Date
    Jan 2010
    Posts
    207
    Doesnt help much, i even already checked that website .... (
    i wouldnt have visited this forum then.

Posting Permissions

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