Last active
October 13, 2015 11:47
-
-
Save timgaunt/4191239 to your computer and use it in GitHub Desktop.
Get size of tables in SQL Azure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select sum(reserved_page_count) * 8.0 / 1024 | |
from sys.dm_db_partition_stats | |
GO | |
SELECT sys.objects.name, sum(reserved_page_count) * 8.0 / 1024 | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Originally from: http://dunnry.com/blog/CalculatingTheSizeOfYourSQLAzureDatabase.aspx