I have a group of about 30 tables, and I want to know the physical size on disk of all of these tables (plus indexes).
Is there an easier way of doing this than through the GUI in SQL server 2008 R2?
If you are looking to get the size information for all tables in the database you can use this query:
It returns the reserved megabytes and the used megabytes as well as the row count for every index in the database. The first column tells you the object type. This includes system_tables as well as indexed views. If you want a subset, filter on that column.
If you do not need the per-index detail you can use this query instead:
It gives the same information, but on an object basis. Again, filter on the object type if you are for example not interested in system_tables.
If you are just interested in normal tables, you can get the information in SSMS too by using the "Object Explorer Details" tab:
You can open it by selecting the table folder in the database in Object Explorer and then pressing
You might have to add the size columns. For that just right-click on the column list and select the columns you want to see:
You can use sp_spaceused stored procedure:
Gives you this:
Hope this is what you're looking for