In mssql2005 when I want to get size of table in MBs, I use EXEC sp_spaceused 'table'.
Is there any way to get space used by particular table in SQL Azure using some query or API?
In mssql2005 when I want to get size of table in MBs, I use EXEC sp_spaceused 'table'.
Is there any way to get space used by particular table in SQL Azure using some query or API?
Here is a query which will give you by table the total size, number of rows and bytes per row:
And here is a query which is the same as above but breaks it down by index:
From Ryan Dunn http://dunnry.com/blog/CalculatingTheSizeOfYourSQLAzureDatabase.aspx
The first one will give you the size of your database in MB and the second one will do the same, but break it out for each object in your database ordered by largest to smallest.
This way you can have the bigger on top:
Source