Personal tools
You are here: Home DB2 DB2 UDB v9 DB2 9.7 How to move tables online using sysproc.admin_move_table on DB2 9.7
Navigation
Log in


Forgot your password?
 
Document Actions

How to move tables online using sysproc.admin_move_table on DB2 9.7

See the example below to move tables between tablespaces

 

TABLE EMPLOYEE:

COD_EMP INT NOT NULL

NAME VARCHAR(20)


Where COD_EMP is a primary key column.

The table employee store its regular data in a tablesapces userspace1 and its indexes in a tablespaces userspaces1.

If you want that the table employee store its regular data in a tablespace tbs32k and its indexes in a tablespace idx32k execute the command below:

db2 "call sysproc.admin_move_table('PEOPLE',EMPLOYEE','TBS32K','IDX32K','LONG32K','','','',
'COD_EMP int not null, NAME VARCHAR(20)','','move')"

 

Where:

PEOPLE is the schema name
EMPLOYEE is the table name
TBS32K: tablespace to storage regular data
IDX32K: tablespace to storage indexes
LOG32K:  tablespace to storage long data

 

COMMAND SYNTAX:

Read syntax diagramSkip visual syntax diagram
>>-ADMIN_MOVE_TABLE--(--tabschema--,--tabname--,---------------->

>--data_tbsp--,--index_tbsp--,--lob_tbsp--,--mdc_cols--,-------->

    .-,-------.    
    V |    
>--partkey_cols--,--data_part--,--coldef--,----options-+--,----->

>--operation--)------------------------------------------------><



Security Awareness
Would you like your company to implement gamification into your security awareness program?





Polls