oracle分区表在把相应的分区及对应的表空间与数据文件删除后要注意原来的索引需要重新rebuild。
alter table paysys_log_oper_login_log drop partition PAYSYS_LOGIN_012011_JX3;
alter table paysys_log_oper_logout_log drop partition PAYSYS_LOGOUT_012011_JX3;
alter table paysys_log_oper_logout_log drop partition PAYSYS_LOGOUT_022011_JX3;
--空闲的表空间
select 'drop tablespace ' || tablespace_name ||
' including contents and datafiles;'
from dba_tablespaces
where not exists (select 12
from dba_segments
where dba_segments.tablespace_name =
dba_tablespaces.tablespace_name);
drop tablespace LOGIN_012011_JX3_IND including contents and datafiles;
drop tablespace LOGOUT_022011_JX3 including contents and datafiles;
drop tablespace LOGOUT_022011_JX3_IND including contents and datafiles;
drop tablespace LOGOUT_012011_JX3 including contents and datafiles;
drop tablespace LOGOUT_012011_JX3_IND including contents and datafiles;
drop tablespace LOGIN_012011_JX3 including contents and datafiles;
ALTER INDEX paysys_log_oper_login_log_idx
REBUILD
NOCOMPRESS
PARALLEL 4
NOLOGGING
TABLESPACE PAYSYS_LOGIN_IXTBS
STORAGE (
INITIAL 64K
)
阅读(3603) | 评论(0) | 转发(0) |