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

merge_partition的更多相关文章

  1. 探讨Oracle分区表

    一年又一年,又到年底了,对于数据库的分区表需要检查一下,有无最大分区,次分区是否需要追加分区,如果程序不是自动追加分区的话,那么年中结算的时候,就会报错. 1.oracle分区主要有五种类型 (1)R ...

随机推荐

  1. sql 生成开始日期到结束日期与开始日期的相差天数

     SELECT    CONVERT(VARCHAR(10), DATEADD(dd, number, '2015-10-25'), 120) AS dtDate          FROM      ...

  2. HDU 5805 NanoApe Loves Sequence

    处理出每个位置左边的最大值和右边的最大值.然后就可以o(1)计算去掉某位置的最大值了. #pragma comment(linker, "/STACK:1024000000,10240000 ...

  3. POJ 2516 Minimum Cost

    每个物品分开做最小费用最大流. #include<cstdio> #include<cstring> #include<cmath> #include<vec ...

  4. Hibernate与Sleep的区别

    转自:http://blog.sina.com.cn/s/blog_4b6e98810100n37k.html 休眠(Hibernate),将系统切换到该模式后,系统会自动将内存中的数据全部转存到硬盘 ...

  5. spark开发

    1. 主要参考资料http://spark.incubator.apache.org/docs/latest/scala-programming-guide.htmlhttp://www.eecs.b ...

  6. Django: 之用户注册、缓存和静态网页

    Django 用户注册系统 Django 的源码中已经有登录,退出,重设密码等相关的视图函数,在下面这个app中 django.contrib.auth 可以点击对应的版本查看相关源代码:1.9  1 ...

  7. htaccess 实现网址缩短

    访问 :app.xxx.com/a 解析到:app.xxx.com/index.php/app/a <IfModule mod_rewrite.c> RewriteEngine on Re ...

  8. 用TLS实现安全TCP传输及配置和访问https的web服务(转)

    tls相关 大致原理 为了让两个之间实现安全传输,(我们把服务端统一叫做TcpServer,客户端统一叫做TcpClient),TcpServer在listen完了accept之后要用一个证书来声明自 ...

  9. 转 : net use的使用

    老是忘了 net use 怎么样,今天在网上找一篇,贴在这,感谢原作者分享.     1 查看远程主机的共享资源(但看不到默认共享) net view \\IP 2向远程主机复制文件 copy \路径 ...

  10. PHP全选择删除功能

    <script type="text/javascript" language="javascript"> function selectBox(s ...