zoukankan      html  css  js  c++  java
  • merge_partition

    set echo on time on timing on spool 01_merge_partition.log

    @/testdb/change/env/env_test.sql connect &V_testDATA_UN/&V_testDATA_PW

    show user

    select index_name from user_indexes where status='UNUSABLE'; select index_name , partition_name from user_ind_partitions where status !='USABLE';

    set echo on termout on feedback 1 set timing on time on

    alter session set sort_area_size=300000000;

    whenever sqlerror exit;

    ------------------------------     TABLE: test_MOVEMENT     ------------------------------

    alter table test_MOVEMENT merge partitions  part144, part145 into partition part145 tablespace TSP_L;

    alter table test_MOVEMENT deallocate unused;

    alter index test_MOVE_PK1 rebuild online tablespace IDX_L;

    alter index test_MOVE_IDX1 rebuild PARTITION part145 TABLESPACE IDX_L;

    alter index test_MOVE_IDX2 rebuild PARTITION part145 TABLESPACE IDX_L;

    alter index test_MOVE_IDX3 rebuild PARTITION part145 TABLESPACE IDX_L;

    alter index test_MOVE_IDX4 rebuild PARTITION part145 TABLESPACE IDX_L;

    alter index test_MOVE_IDX5 rebuild PARTITION part145 TABLESPACE IDX_L;

    ------------------------------     TABLE: test_CONT_AUDIT_LOG     ------------------------------

    alter table test_CONT_AUDIT_LOG merge partitions  part147, part148 into partition part148 tablespace TSP_L;

    alter table test_CONT_AUDIT_LOG deallocate unused;

    alter index test_CONT_AUDIT_LOG_PK rebuild online tablespace IDX_L;

    ------------------------------     TABLE: test_test     ------------------------------

    alter table test_test merge partitions part144, part145 into partition part145 tablespace TSP_L;

    alter table test_test deallocate unused;

    alter index test_test_PK rebuild tablespace IDX_L;

    alter index test_test_IDX5 rebuild tablespace IDX_L;

    alter index test_test_IDX7 rebuild tablespace IDX_L;

    alter index test_test_IDX1 rebuild partition part145 tablespace IDX_L;

    alter index test_test_IDX2 rebuild partition part145 tablespace IDX_L;

    alter index test_test_IDX3 rebuild partition part145 tablespace IDX_L;

    alter index test_test_IDX4 rebuild partition part145 tablespace IDX_L;

    alter index test_test_IDX6 rebuild partition part145 tablespace IDX_L;

    ------------------------------     TABLE: test_test     ------------------------------

    alter table test_test merge partitions part150, part151 into partition part151 tablespace TSP_L;

    alter table test_test deallocate unused;

    alter index test_test_IDX1 rebuild partition part151 tablespace IDX_L;

    alter index test_test_PK rebuild tablespace IDX_L;

    ------------------------------     TABLE: test_test     ------------------------------

    alter table test_test merge partitions part144, part145 into partition part145 tablespace TSP_L;

    alter table test_test deallocate unused;

    alter index test_test_PK rebuild tablespace IDX_L;

    alter index test_test_IDX1 rebuild partition part145 tablespace IDX_L;

    alter index test_test_IDX2 rebuild partition part145 tablespace IDX_L;

    alter index test_test_IDX3 rebuild partition part145 tablespace IDX_L;

    ----------------------------------------------------------------------------------------------

    select index_name , partition_name from user_ind_partitions where status !='USABLE';

    select index_name from user_indexes where status='UNUSABLE';

    select distinct status from user_indexes; select distinct status from user_ind_partitions;

    spool off

  • 相关阅读:
    [转载]重构代码的7个阶段
    查看JDK源码
    敏捷结果30天之第七天:设定边界值和缓冲
    敏捷结果30天之第十一天:高效能、慢生活
    他们到底需要神马???——戏说“用户需求”
    敏捷结果30天之第一天:总体认识敏捷结果方法
    敏捷结果30天之第五天:使用热图标识出重要事情
    重构代码学习笔记一:重构的原则
    开发可统计单词个数的Android驱动程序(2)
    使用Android NDK和Java测试Linux驱动
  • 原文地址:https://www.cnblogs.com/feiyun8616/p/5893191.html
Copyright © 2011-2022 走看看