db2 table space restore

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • pinoy2ser

    db2 table space restore

    hello All,

    im not a db2 person, please forgive me for asking a simple
    question..
    i would like to restore a tablespace from a current database to a new
    database in the same server how do i accomplish this task. I use tsm
    to backup my db...

    i was looking around web and found instruction to the restore command
    in db2...
    this is what i came up with..

    i need to first create the target (empty) database correct? then
    execute the command below?

    RESTORE DBPRODA emidinst1 password1 TABLESPACE PROD02 USE TSM TAKEN AT
    091808 INTO DBTESTB

    thank you in advance..

    pinoy
  • stefan.albert

    #2
    Re: db2 table space restore

    Hi pinoy,

    first of all: what you want to do works with version 9 (and above). If
    you have a lower version, a simple tablespace restore into a(nother)
    DB than the original one will fail.

    You'll have to restore the tablespace you want together with the
    catalog tablespace.
    Please consider a redirected restore (container to another location)
    when restoring on the same system.

    If it is an offline backup no further logfiles are needed, if online
    you'll need a rollforward and some (?) logfiles for this.

    Please see also: http://publib.boulder.ibm.com/infoce...w/v9/index.jsp
    "restore db"

    Comment

    • pinoy2ser

      #3
      Re: db2 table space restore

      On Sep 25, 4:36 am, "stefan.alb ert" <stefan.alb...@ spb.dewrote:
      Hi pinoy,
      >
      first of all: what you want to do works with version 9 (and above). If
      you have a lower version, a simple tablespace restore into a(nother)
      DB than the original one will fail.
      >
      You'll have to restore the tablespace you want together with the
      catalog tablespace.
      Please consider a redirected restore (container to another location)
      when restoring on the same system.
      >
      If it is an offline backup no further logfiles are needed, if online
      you'll need a rollforward and some (?) logfiles for this.
      >
      Please see also:http://publib.boulder.ibm.com/infoce...w/v9/index.jsp
      "restore db"
      Thank you for you feedback..
      i have db2 ver 8.2 fix11.. not too familiar with redirected restore..
      ill search on that thanks..

      Comment

      • w.l.fischer@googlemail.com

        #4
        Re: db2 table space restore

        Thank you for you feedback..
         i have db2 ver 8.2 fix11.. not too familiar with redirected restore..
        ill search on that thanks..
        In that case you may have to use db2move (resp. export/load) to move
        your data. Did you consider that?

        Comment

        • Diego de la Vega

          #5
          Re: db2 table space restore

          This is an example

          db2 -td;

          RESTORE DATABASE SAMPLE FROM "C:\Program Files\IBM\SQLLI B\BIN" TAKEN AT
          20070622115322 TO "C:" INTO newdatabasename
          NEWLOGPAH "c:\dirlog" WITH 2 BUFFERS BUFFER 1024 REDIRECT PARALLELISM 1
          WITHOUT PROMPTING;

          after that command you should enter the locations of each tablespace.
          One set for each tablespace:

          SET TABLESPACE CONTAINERS FOR 0 IGNORE ROLLFORWARD CONTAINER OPERATIONS
          USING (PATH "C:\dir1");
          SET TABLESPACE CONTAINERS FOR 1 IGNORE ROLLFORWARD CONTAINER OPERATIONS
          USING (PATH "c:\dir2");
          SET TABLESPACE CONTAINERS FOR 2 IGNORE ROLLFORWARD CONTAINER OPERATIONS
          USING (PATH "c:\dir3");
          SET TABLESPACE CONTAINERS FOR 3 IGNORE ROLLFORWARD CONTAINER OPERATIONS
          USING (PATH "C:\dir4");

          when you finish with above commands

          RESTORE DATABASE SAMPLE CONTINUE;

          here starts the restore

          or restore database sample abort;
          to stop and start over



          pinoy2ser wrote:
          On Sep 25, 4:36 am, "stefan.alb ert" <stefan.alb...@ spb.dewrote:
          >Hi pinoy,
          >>
          >first of all: what you want to do works with version 9 (and above). If
          >you have a lower version, a simple tablespace restore into a(nother)
          >DB than the original one will fail.
          >>
          >You'll have to restore the tablespace you want together with the
          >catalog tablespace.
          >Please consider a redirected restore (container to another location)
          >when restoring on the same system.
          >>
          >If it is an offline backup no further logfiles are needed, if online
          >you'll need a rollforward and some (?) logfiles for this.
          >>
          >Please see also:http://publib.boulder.ibm.com/infoce...w/v9/index.jsp
          >"restore db"
          >
          Thank you for you feedback..
          i have db2 ver 8.2 fix11.. not too familiar with redirected restore..
          ill search on that thanks..

          Comment

          Working...