I can not believe that I had done this about two years

Now we know there is totally different between oracle parttion table and sqlserver partition table.

Here we go to show them , it used for range right, by the way,

/****** Object: View [dbo].[partition_show] Script Date: 1/16/2015 12:05:00 PM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

ALTER view [dbo].[partition_show]
as
SELECT distinct OBJECT_NAME(T2.object_id) TABLE_NAME
,T1.partition_number
,T4.name as "function name"
,T3.name as "schema name"
,T7.name File_group_name
,T1.rows
,CASE boundary_value_on_right
WHEN 1 THEN 'less than'
ELSE 'less than or equal to ' END as 'comparision'
,CONVERT(varchar(100), T5.value, 112) value
FROM sys.partitions T1
INNER JOIN sys.indexes T2
ON T1.object_id = T2.object_id
INNER JOIN sys.partition_schemes T3
ON T2.data_space_id = T3.data_space_id
INNER JOIN sys.partition_functions T4
ON T3.function_id = T4.function_id
LEFT JOIN sys.partition_range_values T5
ON T4.function_id = T5.function_id
AND T1.partition_number = T5.boundary_id
INNER JOIN sys.destination_data_spaces T6
ON T6.partition_scheme_id = T3.data_space_id
AND T6.destination_id = T1.partition_number
INNER JOIN sys.filegroups T7
ON T6.data_space_id = T7.data_space_id
where T2.object_id in (select OBJECT_ID(t.name) from sys.tables as t inner join sys.indexes as i on t.object_id=i.object_id and i.type in (0,1) inner join sys.partition_schemes ps on i.data_space_id=ps.data_space_id)
AND T1.index_id<=1

GO

sqlserver partitition and partition table --- partition show的更多相关文章

  1. learn about sqlserver partitition and partition table --- add or remove table partitions addition more

    Yes . In the previous. chapter , we see how to generate "partition function" "parttit ...

  2. Mycat+Mysql 插入数据报错 i[Err] 1064 - partition table, insert must provide ColumnList

    使用Navicat连接Mycat 8066 成功插入了分库表和全局表 1.全局表 sql如下: '); '); '); 插入成功! 2.分库表 sql如下: ', null, null, null, ...

  3. 转载:SQL Server 2008-建立分区表(Table Partition) 转载

    数据库结构和索引的是否合理在很大程度上影响了数据库的性能,但是随着数据库信息负载的增大,对数据库的性能也发生了很大的影响.可能我们的数据库在一开始有着很高的性能,但是随着数据存储量的急速增长—例如订单 ...

  4. DBA_Oracle Table Partition表分区概念汇总(概念)

    2014-06-20 Created By BaoXinjian

  5. PLSQL_性能优化系列09_Oracle Partition Table数据分区表

    2014-08-22 Created By BaoXinjian

  6. [Hive - LanguageManual] Alter Table/Partition/Column

    Alter Table/Partition/Column Alter Table Rename Table Alter Table Properties Alter Table Comment Add ...

  7. system partition table

    转载内容 摘录部分我的笔记的中doc,和大家一起感受Oracle 11g在分区方面的增强--System Partitioning 系统分区的特点 ●系统分区与其他分区相比,一个最根本的区别就是不需要 ...

  8. 转 :Oracle分区表 (Partition Table) 的创建及管理

    三.删除分区 You can drop partitions from range, list, or composite range-list partitioned tables. ALTER T ...

  9. WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

    在 mkfs.ext4 /dev/sda2 格式化硬盘空间时,可能出现这种错误. had this situation at office where I was told to re-partiti ...

随机推荐

  1. schedule of 2016-10-17~2016-10-23(Monday~Sunday)——1st semester of 2nd Grade

    most important things to do 1.joint phd preparations 2.journal paper to write 3.solid fundamental kn ...

  2. CTPN-自然文本场景检测代码阅读笔记

    TensorFlow代码 https://github.com/eragonruan/text-detection-ctpn 训练 main/train.py 1. utils/prepare/spl ...

  3. Springboot2.1.1下的自定义拦截器而静态资源不能访问的问题

    1.项目结构 2.自定义拦截器 public class LoginHandlerlnterceptor implements HandlerInterceptor { //目标方法执行之前 @Ove ...

  4. 深入理解 CSS(Cascading Style Sheets)中的层叠(Cascading)

    标题中的 Cascading 亦可以理解为级联. 进入正文,这是一个很有意思的现象.可以直接跳到 总结一下 部分,看完再回过头来阅读本文. 引子 假设我们有如下结构: <p class=&quo ...

  5. 安装SQL的时候,设置用户权限失败

    在安装sql的时候,遇到一个问题: 在查看报表明细中,提示: 就是这三个: 首先确保你是使用管理员用户安装的,如果还不行,运行 secpol.msc 进入本地安全策略 把自己的用户名加入进来就好了.

  6. Java入门 - 语言基础 - 06.变量类型

    原文地址:http://www.work100.net/training/java-variable-type.html 更多教程:光束云 - 免费课程 变量类型 序号 文内章节 视频 1 概述 2 ...

  7. maven常用的远程仓库地址

    <mirror> <id>nexus-aliyun</id> <name>Nexus aliyun</name> <url>ht ...

  8. 【python系统学习07】一张图看懂字典并学会操作

    点击跳转 - 原文地址 数据类型 - 字典(dict) 目录: 一张图get字典 字典是什么 js的对象 字典长啥样 语法伪代码 示例demo 语法成像 字典怎么用 字典长度获取--len函数 提取字 ...

  9. Qt Installer Framework翻译(6-0)

    Qt安装程序框架示例 这些示例说明了如何使用组件脚本来自定义安装程序. Change Installer UI Example 使用组件脚本修改安装程序UI. Component Error Exam ...

  10. 【javaWeb】HttpServletRequest常用获取URL的方法

    1.request.getRequestURL() 返回的是完整的url,包括Http协议,端口号,servlet名字和映射路径,但它不包含请求参数. 2.request.getRequestURI( ...