发博文
云开之家

songyunkui.blog.chinaunix.net

云来山更佳, 云去山如画。 山因云晦明, 云共山高下。   
个人资料
  • 博客访问:396183
  • 博文数量:135
  • 博客积分:7634
  • 博客等级:少将
  • 关注人气: 1
  • 注册时间:2006-03-10 23:04:30
订阅我的博客
  • 订阅
  • 订阅到鲜果
  • 订阅到抓虾
  • 订阅到Google
字体大小: 博文
分类: 关于数据库


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
        )

前一篇:Linux init详解
亲,您还没有登录,请[登录][注册]后再进行评论