Prepare for online table move


On the right pane, you are going to create two new tablespaces tbs2 and tbs3. You will first move the ORDER_DETAILS table to tablespace tbs2 by using the ADMIN_MOVE_TABLE procedure with the INSERT FROM CURSOR option which is the default. Then, the same outcome (but to tablespace tbs3) can be achieved in less time by using the LOAD option.


Capture and drop foreign keys (referential constraints)


Foreign keys are not support by the ADMIN_MOVE_TABLE stored procedure. To move a table with foreign keys, you should:

  1. capture the foreign keys using the db2look command. You can also capture the foreign keys using this SQL statement
  2. drop the foreign keys
  3. perform the table move
  4. recreate the foreign keys

On the right pane, the foreign keys FK_ORDER, FK_PRODUCTS are dropped

Note:- If source table is either a parent or child in an RI relationship, you need to capture the foreign keys definition and recreate them after the table is moved.

The last two commands in the right pane will DROP the FOREIGN KEYs