--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

regress_partition.sql的更多相关文章

  1. 最近帮客户实施的基于SQL Server AlwaysOn跨机房切换项目

    最近帮客户实施的基于SQL Server AlwaysOn跨机房切换项目 最近一个来自重庆的客户找到走起君,客户的业务是做移动互联网支付,是微信支付收单渠道合作伙伴,数据库里存储的是支付流水和交易流水 ...

  2. SQL Server 大数据搬迁之文件组备份还原实战

    一.本文所涉及的内容(Contents) 本文所涉及的内容(Contents) 背景(Contexts) 解决方案(Solution) 搬迁步骤(Procedure) 搬迁脚本(SQL Codes) ...

  3. Sql Server系列:分区表操作

    1. 分区表简介 分区表在逻辑上是一个表,而物理上是多个表.从用户角度来看,分区表和普通表是一样的.使用分区表的主要目的是为改善大型表以及具有多个访问模式的表的可伸缩性和可管理性. 分区表是把数据按设 ...

  4. SQL Server中的高可用性(2)----文件与文件组

        在谈到SQL Server的高可用性之前,我们首先要谈一谈单实例的高可用性.在单实例的高可用性中,不可忽略的就是文件和文件组的高可用性.SQL Server允许在某些文件损坏或离线的情况下,允 ...

  5. EntityFramework Core Raw SQL

    前言 本节我们来讲讲EF Core中的原始查询,目前在项目中对于简单的查询直接通过EF就可以解决,但是涉及到多表查询时为了一步到位就采用了原始查询的方式进行.下面我们一起来看看. EntityFram ...

  6. 从0开始搭建SQL Server AlwaysOn 第一篇(配置域控)

    从0开始搭建SQL Server AlwaysOn 第一篇(配置域控) 第一篇http://www.cnblogs.com/lyhabc/p/4678330.html第二篇http://www.cnb ...

  7. 从0开始搭建SQL Server AlwaysOn 第二篇(配置故障转移集群)

    从0开始搭建SQL Server AlwaysOn 第二篇(配置故障转移集群) 第一篇http://www.cnblogs.com/lyhabc/p/4678330.html第二篇http://www ...

  8. 从0开始搭建SQL Server AlwaysOn 第三篇(配置AlwaysOn)

    从0开始搭建SQL Server AlwaysOn 第三篇(配置AlwaysOn) 第一篇http://www.cnblogs.com/lyhabc/p/4678330.html第二篇http://w ...

  9. 从0开始搭建SQL Server AlwaysOn 第四篇(配置异地机房节点)

    从0开始搭建SQL Server AlwaysOn 第四篇(配置异地机房节点) 第一篇http://www.cnblogs.com/lyhabc/p/4678330.html第二篇http://www ...

随机推荐

  1. URL scheme添加以及查找方式

    2.1.1  添加URL Types URL Scheme是通过系统找到并跳转对应app的一类设置,通过向项目中的info.plist文件中加入URL types可使用第三方平台所注册的appkey信 ...

  2. SMO 的环境

    Microsoft SQL Server System CLR Types - http://go.microsoft.com/fwlink/?LinkId=123721&clcid=0x40 ...

  3. android抓日志

    1. adb logcat -c 清楚以前的日志 adb logcat -s 过滤 adb logcat -s *:E adb logcat -v 指定输出的格式 adb logcat -v brie ...

  4. VBS自编写脚本。(实现批量修改文件名且在执行前,备份原有文件夹中的文件)

    '=========================================================================='' VBScript Source File - ...

  5. YII 常用路径总结

      Yii framework已经定义的命名空间常量 system: 指向Yii框架目录; YII\framework zii: 指向zii library 目录; YII\framework\zii ...

  6. php5.6之后的版本使用curl以@+文件名的方式上传文件无效的解决版本

    使用curl上传文件使用file=@文件路径的方式,在php5.6以后的版本中无法使用了 官方文档给出明确解释 如果需要支持的话,可以将CURLOPT_SAFE_UPLOAD设置为false 或者使用 ...

  7. zend笔记

    ZEND_STRL(str)  等价于 (str), (sizeof(str)-1) ZEND_STRS(str)等价于 (str), (sizeof(str))

  8. 线段树+dp+贪心 Codeforces Round #353 (Div. 2) E

    http://codeforces.com/contest/675/problem/E 题目大意:有n个车站,每个车站只能买一张票,这张票能从i+1到a[i].定义p[i][j]为从i到j所需要买的最 ...

  9. phpStorm设置显示代码行号

    File->Settings

  10. hover带有动画效果的导航

    html,body{overflow-x:hidden;} ul,li{list-style: none;} .nav{width:100%; height: 26px; overflow: hidd ...