Simple step for EMC NW & NMM

(1) disable WINDOWS UAC (reboot)
(2) SET windows domain user AS sysadmin
(3) modify hosts
(4) install software (NW , NMM) (reboot)
(5) CONFIG NWDROP VIEW [partition_show]
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE view [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
,T5.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 t.object_id 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

-----------------------------------------------------------------------------------------------------------------------------
Difference
------------------------------------------------------------------------------------------------------------------------------
original part:
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
new part
select t.object_id 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

An enhance script to check partition tables under all schemas in sqlserver的更多相关文章

  1. (copy) Shell Script to Check Linux System Health

    source: http://linoxide.com/linux-shell-script/shell-script-check-linux-system-health/ This article ...

  2. java中用activiti插件连接mysql数据库,自动建表过程中,在配置mysql架包路径“org.activiti.engine.ActivitiException: couldn't check if tables “

    java中用activiti插件连接mysql数据库,出现错误: org.activiti.engine.ActivitiException: couldn't check if tables are ...

  3. A python script to check NE syncfail and get log from CIPS

    #! /usr/bin/env python # -*- coding: UTF-8 -*- """The script is to check whether NE i ...

  4. partition_show , a new version to check partition table status in sqlserver

    Dear all: I had put "partition_show" before . but this time it makes faster. partition_sho ...

  5. Write a script to check an interesting game 6174

    # -*- coding: utf-8 -*-#from ftplib import FTPimport osdef sort_reverse(x,y): if x>y: return -1 i ...

  6. DB count check for TABLES VIEWS PROCEDURES TRIGGERS

    SELECT DISTINCT(TABLESPACE_NAME) FROM ALL_TABLES; SELECT COUNT(*) FROM ALL_TABLES where TABLESPACE_N ...

  7. check all tables rows

    select TABLE_NAME,NUM_ROWS from all_tables where OWNER='xx' order by NUM_ROWS desc;

  8. Partitioning & Archiving tables in SQL Server (Part 1: The basics)

    Reference: http://blogs.msdn.com/b/felixmar/archive/2011/02/14/partitioning-amp-archiving-tables-in- ...

  9. Mysql Partition 理论知识总结

    简述: 本文内容主要 Giuseppe Maxia 曾在Mysql Conference & Expo 2010发表关于 <Mysql Partition in Mysql 5.1 &a ...

随机推荐

  1. Redis内存碎片清理

    当Redis中清理了大量的Key之后原先Redis申请的内存(used_memory_rss)将继续持有而不会释放,此时查看内存信息将会看到存在大量的内存碎片.那么,Redis的内存碎片可以清理么,该 ...

  2. PHP的一些安全设置

    小伙伴们新年好啊,又有半个月没有更新博客了.更新也比较随性,想起什么就写点什么,方便和大家工作同学习总结. 最近和同事说起了PHP安全相关的问题,记录下一些心得体会. 由于脚本语言和早期版本设计的诸多 ...

  3. 案例分析丨谷歌设计冲刺 4 天决定 Clips 的功能特性

    这次为大家带来Google冲刺日程案例,之前案例分析可以戳对应文字直达:ING集团.音乐流媒体Spotify.美国知名超市Target 作为一款工具类产品,谷歌十分注重产品候选人的技术背景,同时也看重 ...

  4. Thinkpad S440 I/O接口配置

    HDMI 视频接口 SS USB3.0接口 电源接口 音频接口 网络接口 没有com口可以用USB口,然后安装一个USB转com口的驱动.

  5. next_permutation 函数

    next_permutation 是一个定义在 <algorithm> 中的一个全排列函数, 用于按顺序生成一个数列的全排列 基本用法 : int a[] = {1, 2, 3}; do{ ...

  6. android:整理drawable(余下的)(三)

    前言 随着bitmapDrawabe.nithpatchDrawable 与 shapeDrawable 的整理,接下的就更加需要自己的想象设计一些东西. LayerDrawable 意思是层级性的, ...

  7. Postman post csrf_token

    1.填入代码 var csrf_token = postman.getResponseCookie("csrftoken").value postman.clearGlobalVa ...

  8. Java入门 - 面向对象 - 04.抽象类

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

  9. 机器学习回顾篇(15):集成学习之GDBT

    .caret, .dropup > .btn > .caret { border-top-color: #000 !important; } .label { border: 1px so ...

  10. NSCTF-Reverse02 超级详细且简单的办法搞定

    没有壳 VC写的 观察界面 一个编辑框 一个按钮 拖进IDA 在导入表里找到GetDlgItemTextA 为什么找这个函数 因为这个函数的作用就是 获取我们输入编辑框的内容 双击进入 ctrl+X ...