--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. jquety选择器

    基本选择器 1.#id        根据id的属性值来获取元素 2.TagName     根据标签名来获取元素 3.selector1,selector2    匹配列表中的选择器(就是可以匹配多 ...

  2. sublime3安装

    1.下载安装程序 http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%20Build%203059%20Setup.exe 2.下载注册机 http:/ ...

  3. Broken Keyboard(悲剧文本)

    你有一个键盘,键盘上所有的键都能正常使用,只是Home键和End键有时会自动按下.你并不知道这一情况,而是专心地打稿子,甚至连显示器都没开电源.当你打开显示器之后,展现在你面前的是一段悲剧文本.你的任 ...

  4. Box of Bricks

    Box of Bricks Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 65536/32768K (Java/Other) Total ...

  5. 初识Iaas,paas

    Iaas(Infrastructure-as-a-service),直译为基础设备作为一种服务. Paas(Platform as a service),直译为平台作为一种服务. 暂且忘掉这两个单词, ...

  6. Ansible8:Playbook循环【转】

    在使用ansible做自动化运维的时候,免不了的要重复执行某些操作,如:添加几个用户,创建几个MySQL用户并为之赋予权限,操作某个目录下所有文件等等.好在playbook支持循环语句,可以使得某些需 ...

  7. 快速批量插入sqlserver方法之我见

    ---------------------------------------------------------------------------------------------------- ...

  8. 状压dp Codeforces Beta Round #8 C

    http://codeforces.com/contest/8/problem/C 题目大意:给你一个坐标系,给你一个人的目前的坐标(该坐标也是垃圾桶的坐标),再给你n个垃圾的坐标,这个人要捡完所有的 ...

  9. phpStorm 2016.1.2 最新版激活方法【亲测可用】

    测试日期:2016-07-29 下载地址:https://yunpan.cn/c6mWAGbExcyjf  访问密码 00fb 1.windows版本 菜单help >>>> ...

  10. linux 内核协议栈收报流程(一)ixgbe网卡驱动

    首先模块加载insmod ixgbe.ko module_init(ixgbe_init_module); module_init(ixgbe_init_module); { int ret; pr_ ...