Thursday, March 04, 2010
In Episode 3 of Cloud Cover, I mentioned the tip of the week was how to measure your database size in SQL Azure. Here is the exact queries you can run to do it:
sum(reserved_page_count) * 8.0 / 1024
sys.objects.name, sum(reserved_page_count) * 8.0 / 1024
sys.dm_db_partition_stats.object_id = sys.objects.object_id
group by sys.objects.name
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.
Hat tip to David Robinson and Tony Petrossian on the SQL Azure team for the query.