Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2015
    Posts
    6

    Unanswered: Hoe to move a db2 table from one tablespace to another online?

    like in oracle, how to move one table from one tablespace to another in db2 7.1 with all constraints, indexs and triggers etc.?

  2. #2
    Join Date
    Apr 2012
    Posts
    1,034
    Provided Answers: 18
    If you are asking about DB2 V7.1 on Linux/Unix/Windows, (which is very old and unsupported) there was no online-table-move in that version. Later versions of DB2 introduced ADMIN_MOVE_TABLE for this purpose, but that was not present in DB2 V7.1.

  3. #3
    Join Date
    Jan 2015
    Posts
    6
    Quote Originally Posted by db2mor View Post
    If you are asking about DB2 V7.1 on Linux/Unix/Windows, (which is very old and unsupported) there was no online-table-move in that version. Later versions of DB2 introduced ADMIN_MOVE_TABLE for this purpose, but that was not present in DB2 V7.1.
    We have to stick with this db2 version. that is the problem.

    So what is the best way to do this? export and import?
    if export n import, how to make sure that all the contraints, triggers, indexes and dependencies are properly moved with import?

    I am currently trying to create a new tablespace with 8k page size and move table from old tablespace with 4k page size.

    thanks for your reply

  4. #4
    Join Date
    Dec 2007
    Location
    Richmond, VA
    Posts
    1,328
    Provided Answers: 5
    take a look at db2look. You probably won't be able to do as an online move, there are ways you can minimize your outage, such as setting the table up in your new tablespace with a different name, then renaming the old and the new to swap them out.
    Dave

  5. #5
    Join Date
    Jan 2015
    Posts
    6
    I am new to db2. can you give some steps or point me to a doc.? I do not see anything in db2look something suitable for moving data.

  6. #6
    Join Date
    Apr 2012
    Posts
    1,034
    Provided Answers: 18
    The DB2 V7.1 documents are no longer on-line, although there are PDF copies of the docs in some places.


    For db2look, you can refer to the DB2 V8.x documents which are on-line (but some of the command-line options may be specific to V8 , so you can xref from the V8 docs to the output of db2look -h )

    The V8 db2look doc is currently still available here :
    http://www-01.ibm.com/support/knowle...e/r0002051.htm

Posting Permissions

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