• SELECT DISTINCT so.name AS 'table_name', so.object_id,sp.partition_id,si.name AS 'index_name',internals.type_desc,internals.total_pages, internals.used_pages, internals.data_pages,first_iam_page, first_page, root_page
  • FROM sys.objects so
  • INNER JOIN sys.partitions sp ON so.object_id = sp.object_id
  • INNER JOIN sys.indexes si ON sp.object_id = si.OBJECT_ID AND sp.index_id = si.index_id
  • INNER JOIN sys.allocation_units sa ON sa.container_id = sp.hobt_id
  • INNER JOIN sys.system_internals_allocation_units internals ON internals.container_id = sa.container_id
  • WHERE so.object_id = object_id('NotificationRecord');

SqlServer 查看某个表的具体数据分布的更多相关文章

  1. SqlServer查看锁表与解锁

    某些情况下,sqlserver的表会被锁住,比如某个会话窗口有数据一直没提交,窗口又没关闭,这时表就会被锁住 其他任何连接查询表数据时都不会返回 这时需要手工杀掉产生死锁的会话ID,才能恢复正常 查看 ...

  2. sqlserver 查看锁表,解锁

    查看被锁表: 代码如下 复制代码 select request_session_id spid,OBJECT_NAME(resource_associated_entity_id) tableName ...

  3. SqlServer查看对象(表、存储过程、函数)在哪些地方被引用或引用哪些地方

    对象(如表)-->右键-->查看依赖关系 依赖于[]的对象:列出哪些存储过程.函数引用了该表 []依赖的对象:列出该存储过程.函数依赖了哪些表.函数.存储过程

  4. SqlServer查看各个表所占空间大小的sql

    CREATE TABLE [dbo].#tableinfo( 表名 [varchar](50) COLLATE Chinese_PRC_CI_AS NULL, 记录数 [int] NULL, 预留空间 ...

  5. sqlserver查看锁表进程及对锁定的表进行解锁

    select request_session_id spid,object_name(resource_associated_entity_id) tableName from sys.dm_tran ...

  6. SqlServer查看所有表数据条数

    select a.name as 表名, max(b.rows) as 记录条数 from sysobjects a ,sysindexes b where a.id=b.id and a.xtype ...

  7. sqlserver锁表、解锁、查看销表 (转载)

    sqlserver中怎么锁表.解锁.查看销表呢,下面我以三个不同的实例给各位朋友详细介绍一下有需要的朋友可参考一下. 更多详细内容请查看:http://www.111cn.net/database/O ...

  8. sqlserver锁表、解锁、查看锁表

    sqlserver锁表.解锁.查看锁表 http://www.cnblogs.com/zfanlong1314/p/3698566.html http://www.cnblogs.com/chjf20 ...

  9. 如何查看SQLServer数据库每个表占用的空间大小?

    如何查看SQLServer数据库每个表占用的空间大小? 创建存储过程: CREATE PROCEDURE [dbo].[sys_viewTableSpace]AS BEGIN SET NOCOUNT ...

  10. sqlserver查看和解除表死锁

    1,查看那个表死锁 select object_name(resource_associated_entity_id) as tableName, request_session_id as pid ...

随机推荐

  1. 学习unigui【19】unidbgrid的Group By This Field汉化

    上面已经将group by this field 汉化. 由于版本的不断更新,不可避免有汉化遗漏.那么说到 如何汉化问题. 根据ExtJSVersion查找你电脑响应目录文件D:\Program Fi ...

  2. study PostgreSQL【3-get数据库中all表以及表的字段信息】

    get一表的字段相关信息: SELECT col_description(a.attrelid,a.attnum) as comment,pg_type.typname as typename,a.a ...

  3. Anaconda安装常用配置及命令

    Anaconda历史版本下载 https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/ https://repo.anaconda.com/arch ...

  4. 基于MySQL分析线上充值留存率

    1.数据清洗 步骤: 1.查询charge_record表业务类型为充值且订单状态为成功的数据 2.将上述数据转移到本地数据库 使用如下脚本: # coding=utf-8import pymysql ...

  5. 用ResourceHacker修改EXE图标

    1.打开ResourceHacker.exe 2.点击文件-打开-选择你需要修改的exe文件 3.点击操作-添加图像或二进制文件 4.点击选择文件-选择ico图标-添加资源 5.点击绿色保存图标 6. ...

  6. Golang服务可观测和思路分享

    省流 中医四诊"望闻问切"与程序诊断有异曲同工之妙.在Golang问题排查中,我们需要建立系统化的诊断思维:通过观察表象(望).收集信息(闻).追溯根源(问).精准施治(切)四个维 ...

  7. PC端自动化测试实战教程-3-pywinauto 启动PC端应用程序 - 下篇(详细教程)

    1.简介 经过上一篇的学习.介绍和了解,pywinauto的强大,不言而喻吧!宏哥讲解和分享的是电脑自带和安装的应用程序.有些小伙伴或者童鞋们已经迫不及待地私信宏哥,如果在电脑中这个应用程序已经启用了 ...

  8. 代码随想录第十天 | Leecode 232. 用栈实现队列、Leecode 225. 用队列实现栈、 Leecode 20. 有效的括号、Leecode 1047. 删除字符串中的所有相邻重复项

    Leecode 232. 用栈实现队列 题目链接:https://leetcode.cn/problems/implement-queue-using-stacks/submissions/ 题目描述 ...

  9. 内网私仓全流程搭建记录(一)-Nexus3环境搭建

    1.部署 1)在https://help.sonatype.com/repomanager3/product-information/download中下载对应环境及版本,此处要求3以上版本,本次以& ...

  10. IDEA 使用@Autowired提示Field injection is not recommended

    摘要:IDEA 使用@Autowired提示Field injection is not recommended问题的解决办法.   在使用@Autowired注解进行bean注入,完成自动装配的工作 ...