如何查找 SQLServer 数据库中所有空间的使用位置 [英] How to find where all of the space in a SQLServer database is being used

查看:18
本文介绍了如何查找 SQLServer 数据库中所有空间的使用位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个 SQL Server 数据库,根据 Microsoft SQL Server Management Studio 的说法,该数据库只有 6436Mb 中的 119Mb 可用.

We have a SQL server database which, according to Microsoft SQL Server Management Studio has just 119Mb out of 6436Mb available.

还有命令:EXEC sp_msforeachtable 'sp_spaceused ''?'''
显示总保留空间小于 2Gb

Yet the command: EXEC sp_msforeachtable 'sp_spaceused ''?'''
reveals a total reserved space that is less than 2Gb

我们如何找出剩余空间的使用位置?

How can we find out where the rest of the space is being used?

推荐答案

如果您使用安装了 Reporting Services 的 SQL Server 2005,您可以尝试运行名为按表划分的磁盘使用情况"的内置报告.您可以在 Management Studio 中通过右键单击您的数据库并选择:报告->标准报告->表的磁盘使用情况来访问它.

If you are using SQL Server 2005 with Reporting Services installed, you can try running the built-in report called "Disk Usage by Table". You can access this in Management Studio by right-clicking on your database and selecting: Reports->Standard Reports->Disk Usage by Table.

此报告将为您提供以下信息:表名,记录数,保留 (KB),数据 (KB),索引 (KB),未使用 (KB)

This report will give you the following information: Table Name, Number of Records, Reserved (KB), Data (KB), Indexes (KB), Unused (KB)

这篇关于如何查找 SQLServer 数据库中所有空间的使用位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆