admin_move_table是可以online完成一些这类需要表结构变化的事情,fixpack 11.1.4.4又加了些新features
看一个超简化的示例,
db2 => connect to sample
Database Connection Information
Database server = DB2/LINUXX8664 11.1.4.5
SQL authorization ID = DB2INST1
Local database alias = SAMPLE
db2 => create table t (i int, k int)
DB20000I The SQL command completed successfully.
db2 => insert into t values(1,3)
DB20000I The SQL command completed successfully.
db2 => describe table t
Data type
Column name schema Data type name
I SYSIBM INTEGER
K SYSIBM INTEGER
db2 => call ADMIN_MOVE_TABLE('DB2INST1','T','','','','','','','i int, j int, k int','','MOVE')
。。。。。。
db2 => describe table t
Data type
Column name schema Data type name
I SYSIBM INTEGER
J SYSIBM INTEGER
K SYSIBM INTEGER