如何在SQL Server 2008中查找表空间的总使用量? [英] How to find the total tablespace usage in SQL Server 2008?
本文介绍了如何在SQL Server 2008中查找表空间的总使用量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在SQL Server 2008中,如何查找(通过SQL查询)SQL Server(2008 R2)的特定实例(或所有实例)的表空间使用百分比?
In SQL-server 2008, How would I find (through an SQL query), the percentage of tablespace usage for a particular instance(or all instances) of a SQL Server(2008 R2)?
此外,获取SQL Server所有命名实例列表的最佳方法(查询)是什么?
Also, what is the best way (query) to get the list of all the Named Instances of a SQL Server?
推荐答案
这就是您需要的:
EXEC sp_spaceused null, false
结果:
database_name database_size unallocated space
--------------- ------------------ ------------------
DATABASE_NAME 220.25 MB 69.92 MB
reserved data index_size unused
------------------ ------------------ ------------------ ------------------
110672 KB 80368 KB 26944 KB 3360 KB
这篇关于如何在SQL Server 2008中查找表空间的总使用量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文