Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2002
    SF bay area

    Unanswered: move table between tablespace

    is this a quick way to move a table from one tablespace to another tablespace. I like to execute this procedure withing a java script

  2. #2
    Join Date
    Nov 2002

    Re: move table between tablespace

    Yes, we do it all the time, we use db2look to get all the information from the db2look and use an export command to download the data to a file, then import it back into the new table.

    1) db2look to get table/views/indexes info and edit look file and name newtablle new_tablename, & create new_indexes after import will be quicker if you have intraparllel on new_indexes
    2) export data
    3) import into new_tablename
    4) select count against both make sure there the same
    5) Drop views
    6) drop old table (which will drop indexes)
    7) rename new table to orig name
    8) create views
    9) run runstats against table

    can also use insert into or load (must run back when fin) instead of import, import run quicker then insert but not as fast as load, but load requires a back before you can bring new tablespace online

Posting Permissions

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