Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Dukagjin Maloku - Dugi'DBA

Everything that I can post for the SQL Server ...

SP_SPACEUSED & SP_MSTABLESPACE

Take a look two SP inside the sys Procedure in SQL Server 2008 (included also in the SQL Server 2005), and they are the documented one which is "sp_SpaceUsed" and undocumented one "sp_MSTableSpace".

SP_SPACEUSED

Yes, it is documented store procedure inside the SQL Server 2008 (incl, SQL Server 2005), and the way how to execute it is:

EXEC sp_spaceused 'TableName'

For very few seconds, for the table that you choose, you will have info about:

How many rows are in the table,
How much space are reserved for that table,
How many KB data are allocated,
What is the SUM of Indexs Size,
What about your unused space.

---

SP_MSTableSpace

EXEC  sp_MSTableSpace 'TableName'

The second one is the undocumented store procedure that shows less results than SP_SPACEUSED but it is usefull for quick info about a table.

The info that we can have from this Sys SP is:

Number of Rows,
Data Space Used,
Index Space Used.

Conclusion

As you can see, two SYS SPs tell us a little bit same info about a table, exactly the Rows Number and Data Space Used. Anyway two SPs are very quick and very usefull.

Stay Tuned!

Comments

Posted by Anonymous on 3 May 2010

Pingback from  Table Sizes | SQL RNNR

Posted by Anonymous on 20 May 2010

Pingback from  500e Aftermarket Auto Cls55 Cls63 Amg, Mercedes Benz R63 Replacement Sl63 Cls63 Amg

Posted by Anonymous on 21 May 2010

Pingback from  1957 Pontiac Cabriolet, Achat Bmw M6 Cabriolet

Leave a Comment

Please register or log in to leave a comment.