How to find the total tablespace usage in SQL Server 2008?

 

Questions


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)?

Also, what is the best way (query) to get the list of all the Named Instances of a SQL Server?

 

 

————————————————-

Answer

is this what you need:

EXEC sp_spaceused null, false

result:

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

instances,sql,sql-server-2008,sql-server-2008-r2,tablespace

Facebook Comments

Post a comment