记录....
select 'alter table channel.'||table_name||' move tablespace base_dat ;'
from dba_tables where wner='CHANNEL' ;
select 'alter table channel.'||table_name||' move tablespace sale_dat ;'
from dba_tables where wner='CHANNEL' and table_name in
(
'IC_TRANS_DTL',
'SL_SO_DTL' ,
'IC_TRANS_DTL_SEQ' ,
'IC_STORE_PROD' ,
'SL_MAKE_PRICE' ,
'IC_SCAN_LOG',
'SL_SO' ,
'PO_PR_DTL' ,
'PO_PO_DTL',
'PO_PR'
) ;
select 'alter table channel.'||table_name||' move tablespace log_dat ;'
from dba_tables where wner='CHANNEL' and table_name in
(
'PO_PO' ,
'SL_SI' ,
'SL_SI_DTL' ,
'BD_PROD' ,
'SL_PROD_PRICE' ,
'CP_CPY_EXT' ,
'RM_RO' ,
'RM_RO_EXPECT_DTL') ;
select 'alter index channel.'||index_name||' rebuild tablespace base_idx ;'
from ALL_INDEXES where table_owner='CHANNEL' ;
select 'alter index channel.'||index_name||' rebuild tablespace sale_idx ;'
from ALL_INDEXES where table_owner='CHANNEL' and table_name in
(
'IC_TRANS_DTL',
'SL_SO_DTL' ,
'IC_TRANS_DTL_SEQ' ,
'IC_STORE_PROD' ,
'SL_MAKE_PRICE' ,
'IC_SCAN_LOG',
'SL_SO' ,
'PO_PR_DTL' ,
'PO_PO_DTL',
'PO_PR'
) ;
select 'alter index channel.'||index_name||' rebuild tablespace log_idx ;'
from ALL_INDEXES where table_owner='CHANNEL' and table_name in
(
'PO_PO' ,
'SL_SI' ,
'SL_SI_DTL' ,
'BD_PROD' ,
'SL_PROD_PRICE' ,
'CP_CPY_EXT' ,
'RM_RO' ,
'RM_RO_EXPECT_DTL') ;