1. sp_spaceused

计算数据和索引使用的磁盘空间量以及当前数据库中的表所使用的磁盘空间量。如果没有给定 objname,sp_spaceused 则报告整个当前数据库所使用的空间。

语法

sp_spaceused [[@objname =] 'objname']
    [,[@updateusage =] 'updateusage']

示例:

EXEC sp_spaceused Tbl1000,true

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYMAAAA/CAIAAACNeTP/AAAJdklEQVR4nO2dy47jNhaG+U5a1dP0ju9iwFsXwJ0XhdoMZuN5Aa/LBAYTZOIggSbpVKeTcapRVt3abcvgLFilkcSrKInmKZ8PhMCiKfLnofznSHY7ZDKdibNhMp1tEQRJD3JuTnQ+5dSXFoJ04OycqDwP0IkQWNiciDKuLRltl5hu0ofJdPbQZLlcLpfLRZP5/OoBMuhECDgcTsS4eC1MUEMB7USMtcVvNhvK2EkcZCjQiRBwdMuJ1GwoozzLIDlR0aRyoqIo+J3gd+L6ZkspKyBzOBzQiRBY2Jyoni+sVquqvlwuZWW32zHGs4xqTyc1+tjHIINI1PenXON6veacr1ar65stY5xSdpLNGAp0IgQcvk5UuY8QYrFYCCF2u11RFIzxi4sLi4m0KsGoIwSMOZnO7pswxhnni8WCMT6fX8lCKbuHDDoRAg6bE83nV+v1erVaLZvI9618sgvOib40UZ8TXd9sX5MjzhnneZ5/MSOTtXolBfb7PToRAguHE1X1ek7EGJfPI/idmM+v7E6k3li1Wlo3cWql6mYf2edmcDKd3TVhjN/e3m42m81mw7m4vtle32zrK80ymuf5nQE5Xb2SAuhECDg6353tdrvFYlG8Pd91OlHLRNQsyZLsWJxIbfFJkSbT2V9NGON5njfSPc6FEIIxwShjfLVaSTP6S4c0oHolBdCJEHDYnOjy8pJzLt+i1cMUeayeqjDGOt2daTMXU/rTyYnUcVQm01neRL07e3UiIYQQeZ5nlGYZlWakImesV1rt9T/rjWqLepblREuHPM9fXl7QiRBYOJzo/+9PxuUj6qIo5vMrfifkvczl5aXpszPhlwF5dvZxIucUk+ns5ybSiWSKt9ls+N2bEz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MiB3AoAH+Kb/+B8WELfsfaf6tgAUU8FJ3BJLtAtxPF/P1t/I61/1bBAop4KDqDSXaBHk4U8fe3MSfy3ypYQBEPRWcwyS7Q7UQxf/UWcyL/rYIFFPFQdAaT7AKTcyLMiTy3ChZQxEPRGUyyC3Q7Uczf08acyH+rYAFFPBSdwSS7wJaw/wGyxzzjpEnZMQAAAABJRU5ErkJggg==" alt="" />

如果省略 objname,则返回两个结果集。

列名 数据类型 描述
database_name varchar(18) 当前数据库的名称。
database_size varchar(18) 当前数据库的大小。
unallocated space varchar(18) 数据库的未分配空间。
列名 数据类型 描述
reserved varchar(18) 保留的空间总量。
Data varchar(18) 数据使用的空间总量。
index_size varchar(18) 索引使用的空间。
Unused varchar(18) 未用的空间量。
EXEC sp_spaceused

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAb8AAACqCAIAAACyHda5AAARFUlEQVR4nO2dy27buBqA+U5e9Wlmp3cJkG0KaJdF0c3B2eS8QNaNgIMzmJkMZuDpJb1NpkXtNEldR4bOQqksiRdRtEyK8vfhh6HQFMmflL4wTlOJ4jA4Oj5ZAAAMhwitNU8cHZ8cToS+qAAOggOyZ34YYE8AP6jtmaSZMmZJOzxL0Jmj45ObJufn5+fn52dNTk+f3cQM9gTwhtaeaVY8RlokmojanmnaHvz19XWSpkGsNxTYE8AbtntPedc5S7LZLCZ7LptU9lwul9mnIvtUPH+xSJJ0GTMPDw/YE8APanvW92UXFxfV8fn5eXmwWq3SNJvNEuXposYuyhukkRLZKWWOl5eXWZZdXFw8f7FI0yxJ0iDLMBTYE8Ab3fasjFkUxdnZWVEUq9VquVymafbkyROD+FoHzsgtOLR5dHzypUmaZmmWnZ2dpWl2evqsjCRJv8QM9gTwhlpDp6fPLi8vLy4uzpuUril/uxKdPT83kT/3fP5i8bgJzbI0y+bz+Wc95aa4fjAG1us19gTwg9ae1XF975mmWfn5WvapOD19Zran/EN3q6T1A758UFUzt2zzQcHR8cmnJmmaXV1dXV9fX19fZ1n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xdC3/EaHz3rP1VtVgrxK5KV0dZQU5HfPSdDY4zpFbYrjUleOUc9SNVteU/NawSwNB6LDnIBerEuXeUzRlV5ea0nS6s2xKdBLsPOi199TdePJBday7UetNGW7mVu82/cpLY2jKMM7gI7fEebEMdczVlH11HtiPHILQsGfrUVnlFbCnh2Qp9546xwnVVnR/9tRJfPe9p80dZbiB3RzUaYQWnbeofO5IRm6J5d5TV9hpT3nwujYHXxrwScOenc9jGDDMn3sqdWlwnMF0fe0p9yUX2u89C/0Pg606OiXVj5VNmVZX05H5LHMu5pHL7fscuSW97GmzLq1jS3sOuzTgn5D21CnJoEXDZlDnx7729Lb3dL4tO9tpvWVuSmbAvafnkVuyV3tajnNPSwM+Gd3eUykpWZQVlibdtz3t957K41aJ8q363iQWe3oeuSUe9p71lA0dYc+oadqz62k2A0bn5572SjW342BP88Gwe09zia6pXg4yH8gM/lsjbyO3ZN/21J2ofHf3pYFQhLSn0kF1WoXKyvZn6dpRVhASBnUa9p7V6fYlrX7l1nTtGLqW0zFcE3v6F0seRm6JfYKFyokOKRs6GmRpIAgNe5qfBTZs8LdGo2Xyt2i8CcY78knSsKfPR2Xxt0ajZUq5KIk3wXhHPkma9vT4qCz2nqNl8rdovAnGO/JJ0rCnz4e9sPccLVPKRUm8CcY78kkS0p7sPcfJ5G/ReBOMd+STpGFPn0+2Yu85WqaUi5J4E4x35JOkYU+fD7di7zlaJn+LxptgvCOfJA17+keM4FFuQ70C7JuwsoAWW3uGHQcAQFxgTwAAF7AnAIAL2BMAwAXsCQDgAvYEAHABewIAuPB/eSi7wWPy3z8AAAAASUVORK5CYII=" alt="" />

2. sys.dm_db_index_physical_stats

返回指定表或视图的数据和索引的大小和碎片信息。
 
语法
sys.dm_db_index_physical_stats (
{ database_id | NULL | 0 | DEFAULT }
, { object_id | NULL | 0 | DEFAULT }
, { index_id | NULL | 0 | -1 | DEFAULT }
, { partition_number | NULL | 0 | DEFAULT }
, { mode | NULL | DEFAULT }
)

示例

SELECT index_type_desc, alloc_unit_type_desc, index_depth, page_count, record_count
FROM sys.dm_db_index_physical_stats(DB_ID(),OBJECT_ID('dbo.Tbl1000'),NULL,NULL,'SAMPLED');

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlwAAABXCAIAAABeJgwNAAAPSUlEQVR4nO2dzW/bRhrGB/0r+mcUUC9Bcu8pQO8pmgJFiSKHopciRXrpJQenbg4FqC03SOxDYBtYpO3aySU92Jss0EXE9CNI6saJHH80rS3LtuRPWZLBPVCmqZnhaEiKXzPPDw8EcjScmfcdio+Hom3i5IDXDz9yWitivX740WZ4TNM8OjraAgAAUFiOjo5M01xbW4vgAmEhPm+69+HbXy9428Tlw3uBJb4DqbcWvn6bU01oigcvxRKb4r1797jlpmm2Wq1kUgdAlpw9e/aTTz5ZXl4+e/bs9evXp6enCSHXr1/PelwADJ9Wq2Wa5tLSUgp9kVMXI4ScmOK9D3ue5rkbW9LniSd13Aa8yiFMcX9erCBT3NjYmJiYuHz5Mvdd1xQ3NuoQpJjOnTt39erVlZXVc+fOjY2N/fDDv994442xsbHMBwZBQ5driouLi0m6YQ/fSnHh67d7pugztV4hWxJsimwFGVPceyIW1xSfPn1648aNy5cvX716lRueaZqHh4fr6zUIUkznz5//5ptvlpdXzp8/PzU19f33P7z55ptTU1OZDwyChq7Dw8PcmGJvmy3x01tnurdPwy4Te6a4/R9XX37+AfHx5ecfuOVcU7x165briJOTk9zwTNPc3d1bXFyCIMV04cJ7N2/efP584cKF9+7c+W5ycuqtt966c+e7zAcGQUPX7u5esUyx3x97K8ugLyADTLF+z9OnH7/rHvzpx+96hVxTfPbs2dTU1OTk5OzsLDc80zS3trafPHkKQYrp0qVLU1NTv/7626VLl2ZmZm7dGnvnnXdmZmYyHxgEDV1bW9u5MUWZ26dsE74bqjKuSJmi64t+Rwwyxc3NzVqt9vjx40qlwn3XNM3Nza2ff/kNghTTlStf3L179/HPv1y58sX9+z/euHHz/fffv3//x8wHBkFD1+bmVramGPJBGw+vUmxTZ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kJggg==" alt="" />

MSDN:https://msdn.microsoft.com/zh-cn/library/ms188917%28v=sql.105%29.aspx

SQL Server查看表信息的更多相关文章

  1. SQL Server删除表信息的三种方法

    1.使用DELETE实现SQL Server删除表信息 (1)删除表中的全部信息 USE student GO DELETE student      --不加where条件,删除表中的所有记录 go ...

  2. SQL Server 查看表定义的 2 种方法

    方法 1. 用SQL Server Management Studio 第一步找到要查看的表,右键 第二步点设计 方法 2. sp_help @objname = 'tableName' execut ...

  3. SQL SERVER 查看表是否存在

    查看表是否存在 if exists(select 1 from sysobjects where id = OBJECT_ID('数据库名称.dbo.表明称')) drop table 为字段添加注释 ...

  4. sql server 查看表的死锁和Kill 死锁进程

    查询出来 select        request_session_id spid,       OBJECT_NAME(resource_associated_entity_id) tableNa ...

  5. sql server查看表大小

    查看SqlServer 数据库中各个表多少行 : SELECT A.NAME ,B.ROWS FROM sysobjects A JOIN sysindexes B ON A.id = B.id WH ...

  6. SQL SERVER用户表信息

    可以使用下面这个语句查看用户表的相关信息 RowCount 记录数 FileGroup 文件组 PartitionScheme 分区结构 IsPartitioned 是否分区 SELECT tbl.n ...

  7. sql server查看表是否死锁

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

  8. SQL SERVER 查看数据库信息

    a.使用sys.database_files查看有关数据库文件的信息 b.使用sys.filegroups查看有关数据库组的信息. c.使用sys.master_files 查看数据库文件的基本信息和 ...

  9. Sql Server 查看表修改记录

    可以尝试如下建议:1.可以使用默认的Log工具或者第三方的(比如:LiteSpeed)的工具.2.做Trace机制,下次出现问题可以溯源.3.一个简单的办法: --Step #1: USE DBNam ...

随机推荐

  1. Objective-C的singleton模式

    最近因为在ios应用开发中,考虑到一些公共方法的封装使用,就决定使用单例模式的写法了..不知道,Object-c中的单例模式的写法是否和java中的写法是否有所区别?于是阿堂从网上一搜,发现“ Obj ...

  2. 剑指OFFER之数值的整数次方(九度OJ1514)

    题目描述: 给定一个double类型的浮点数base和int类型的整数exponent.求base的exponent次方. 输入: 输入可能包含多个测试样例.对于每个输入文件,第一行输入一个整数T,表 ...

  3. jsp界面动态时间显示

    <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"% ...

  4. struts2的action的知识点和利用action向页面注入值的操作

    1.      Action的顺序,会先搜索指定名字下的包的action,如果找不到会去搜索默认路径下的包下的action. 2.      如果没有给action设置值,那么action会有一些默认 ...

  5. Realsense 提取彩色和深度视频流

    一.简要介绍 关于realsense的介绍,网上很多,这里不再赘述,sdk及相关文档可参考realsense SDK,也可参考开发人员专区. 运行代码之前,要确保你已经安装好了realsense的DC ...

  6. 80端口被NT kernel & System 占用pid 4

    前段时间停止了Apache,结果在打开的时候发现无法打开,80端口被占用,于是win+r 运行cmd 输入netstat -ano 可以看到80端口被PID4占用,于是打开任务管理器-进程-查看,选择 ...

  7. 【M20】协助完成“返回值优化(RVO)”

    1.方法返回对象,会导致临时对象的产生,这降低了效率,const Rational operator* (const Rational& lhs,Rational& rhs).有没有什 ...

  8. HDU 4819 Mosaic 二维线段树

    Mosaic Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/view.action ...

  9. c#匿名类 anonymous学习

    感谢http://blog.csdn.net/jjx0224/article/details/5887589 感谢http://hi.baidu.com/guodong828/blog/item/cc ...

  10. windows command ftp 中文文件名乱码解决方法

    有时,使用临时的windows机子,要进行ftp简单操作,但又不想装其它的ftp-client,可以直接使用windows command中的命令ftp来操作. 通常,ftp服务器按标准,使用utf8 ...