Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2009
    Posts
    272

    Unanswered: Tablespace restore

    Environment : DB2 V9.7 FP3 on Linux

    DPF environment . 17 logical nodes spanned across 3 physical nodes

    I have two databases. Database A and Database B. I have taken an online tablespace backup of one tablespace on database B. Can I restore that tablespace on to existing database A ??

    If online is not possible, Can I do with an offline tablespace backup?

    Note that there are other tablespaces on Database A and all of them needs to be preserved.

    Any help or suggestion for this is greatly appreciated.

  2. #2
    Join Date
    Jan 2010
    Posts
    335
    See:
    Restoring to an existing database - IBM DB2 9.7 for Linux, UNIX, and Windows

    For database-level you can restore into other database. It's not stated for tablespace-level. If it's possible, you need the same seed, same tablespace. Not very likely that it works.

  3. #3
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Not sure if it will work in a partitioned database, but try the TRANSPORT option when restoring.

    Transport examples - IBM DB2 9.7 for Linux, UNIX, and Windows

  4. #4
    Join Date
    Jun 2009
    Posts
    272
    Transport option is actually not available in partitioned environment.

  5. #5
    Join Date
    Jun 2009
    Posts
    272
    Can a tablespace level online backup be restored to another new database in DPF environment?
    Example: I have a database with tablespaces syscatspace, tempsapce, userspace1, userspace2, userpace3. I only wanted to restore userspace 1 to another new database using a tablespace level backup. Here the new database should only have the restored tablespace. All the other existing data is not required on the new database.

  6. #6
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    Look at the restore with rebuild option. You need to restore syscatspace as well. A simple example is here: http://www.dbforums.com/db2/1650996-...e-restore.html

    This presentation can be very helpful:
    http://www.idugdb2-l.org/conferences...ta/NA08D07.pdf

  7. #7
    Join Date
    Jul 2011
    Posts
    29
    Thank you all for your suggestions, however, I'm still having issues.

    I'm on a partitioned environment (2 nodes).

    Node 0: Catalog Node
    Node 1 and Node 2 with data etc.

    I'm attempting to run a redirect restore for just one tablespace for now. The restore is from an online tablespace backup image on a different instance.

    Here is the command I ran followed by the error:

    RESTORE DATABASE DB1_DB REBUILD WITH TABLESPACE ( TEMPSPACE2 , MYTABLESPACE, WRAPPER1 , TEMPSPACE16K_2 ) USE TSM OPEN 1 SESSIONS OPTIONS '-fromowner=Instance_1' TAKEN AT 20111128
    122156 INTO DB2_DB NEWLOGPATH '/DB2_DBlog_dir/DB2_DB/NODE0002/' REDIRECT WITHOUT ROLLING FORWARD WITHOUT PROMPTING

    It doesn't allow be to perform the restore as it states the following error message:

    SQL2537N Roll-forward is required following the Restore.

    I specifically stated the WITHOUT ROLLING FORWARD option as I will need to ROLLFORWARD to a specific point in time.

  8. #8
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by sanchez786 View Post

    I specifically stated the WITHOUT ROLLING FORWARD option as I will need to ROLLFORWARD to a specific point in time.
    That's wrong. "WITHOUT ROLLING FORWARD" means that you do _not_ intend to rollforward the database, so it should _not_ be placed into the rollforward pending state.

    Lose this option and rerun the restore.

  9. #9
    Join Date
    Jul 2011
    Posts
    29
    Quote Originally Posted by n_i View Post
    That's wrong. "WITHOUT ROLLING FORWARD" means that you do _not_ intend to rollforward the database, so it should _not_ be placed into the rollforward pending state.

    Lose this option and rerun the restore.
    I did that, but now that I want to rollforward the tablespace, I run the following command:

    db2 "rollforward db DB2_DB to 2011-11-28.12.30.00.0000 using local time and complete tablespace(MYTABLESPACE) online

    It returns the error:

    SQL1117N A connection to or activation of database "DB2_DB" cannot be made
    because of ROLL-FORWARD PENDING. SQLSTATE=57019

Posting Permissions

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