Home             About Us             Sign Guest Book             Contact Us             Subscribe              RSS  
Articles
Tools
Code Snippets
Links
Tips & Tricks
FAQ
Resources
Articles
Code Snippets
Links
FAQ
Resources

Saravana Kumar
Vinod Kumar

Click on the image to subscribe to our Monthly Newsletter.


Click here for Archives

No Chats Available

Finding size of Table/Indexes in SQL Server 2005

This is an question that came up in the newsgroups to how fo we find the size of tables and indexes in the new version of SQL Server 2005. The solution to the same was using some of the DMVs (Dynamic Management Views) that have statistical information of objects. And for this case we use CTE's too that got introduced in SQL Server 2005.

The outout of the same would list all the tables and indexes with the size they occupy. As said earlier we use the sys.dm_db_partition_stats to query and get the data. This data used to be in sysindexes earlier.

  Download the sql file

 

 

Comment about this article
Free Hit Counters
Free Hit Counters