SQL Azure table size
SQL Azure table size
SQL Azure table size
Re: SQL Azure table size
From Ryan Dunn
[http://dunnry.com/blog/CalculatingTheSizeOfYourSQLAzureDatabase.aspx](http://dunnry.com/blog/CalculatingTheSizeOfYourSQLAzureDatabase.aspx)
`select
sum(reserved_page_count) * 8.0 / 1024 [SizeInMB]
from
sys.dm_db_partition_stats
GO
select
sys.objects.name, sum(reserved_page_count) * 8.0 / 1024 [SizeInMB]
from
sys.dm_db_partition_stats, sys.objects
where
sys.dm_db_partition_stats.object_id = sys.objects.object_id
group by sys.objects.name
order by sum(reserved_page_count) DESC
```
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.
[http://dunnry.com/blog/CalculatingTheSizeOfYourSQLAzureDatabase.aspx](http://dunnry.com/blog/CalculatingTheSizeOfYourSQLAzureDatabase.aspx)
`select
sum(reserved_page_count) * 8.0 / 1024 [SizeInMB]
from
sys.dm_db_partition_stats
GO
select
sys.objects.name, sum(reserved_page_count) * 8.0 / 1024 [SizeInMB]
from
sys.dm_db_partition_stats, sys.objects
where
sys.dm_db_partition_stats.object_id = sys.objects.object_id
group by sys.objects.name
order by sum(reserved_page_count) DESC
```
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.