zoukankan      html  css  js  c++  java
  • regress_partition.sql

    --ENV --UAT @/test/change/env/env_test_uat.sql

    set echo on time on timing on set feedback on set pagesize 1000 set linesize 150 col owner for a10 col segment_name for a30 col partition_name for a15 col high_value for a85

    conn  &v_system_un/&v_system_pw

    show user

    select s.segment_name,s.partition_name,s.bytes/1024/1024 Mb, t.high_value from dba_segments s , dba_tab_partitions t where s.partition_name = t.partition_name and s.segment_name =t.table_name and s.owner=t.table_owner order by 1,2 /

    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;

    -------drop added partitions for yearly housekeep

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

    ------split merged partitions alter table test_1 split partition part143 at (20140801) into ( partition part142 tablespace tsp_l, partition part143 tablespace tsp_l);

    alter table test_2split partition part136 at  (TO_DATE(' 2015-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))  into ( partition part135 tablesp ace tsp_l, partition part136 tablespace tsp_l);

    alter table test_3 split partition part133 at  (TO_DATE(' 2014-08-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))  into ( partition part132 table space tsp_l, partition part133 tablespace tsp_l);

    alter table test_4 split partition part141 at  (20150401)  into ( partition part140 tablespace tsp_l, partition part141 tablespace tsp_l);

    alter table test_5 split partition part133 at  (TO_DATE(' 2014-08-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))  into ( partition part132 tablespa ce tsp_l, partition part133 tablespace tsp_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

  • 相关阅读:
    spring 整合 shiro框架
    Kafka常见问题及解决方法
    设计模式之解释器模式规则你来定(二十五)
    设计模式之原型模式简单即复杂(二十四)
    设计模式之访问者模式层次操作(二十三)
    设计模式之状态模式IFORNOIF(二十二)
    设计模式之职责链模式永不罢休(二十一)
    设计模式之组合模式透明实用(二十)
    设计模式之享元模式高效复用(十九)
    设计模式之迭代器模式解析学习源码(十八)
  • 原文地址:https://www.cnblogs.com/feiyun8616/p/5916576.html
Copyright © 2011-2022 走看看