If you are hosting on Microsoft Windows Cloud (Azure), you know that the two type of databases that you can allocate are restricted to 1GB and respectively 5GB to the personal edition and 150GB for the business edition.
If you wish to know how much space you have used so far, use the following query to return the database size:
sum(reserved_page_count) * 8.0 / 1024 asDatabaseSizeMB
The result will be shown in MB as in the picture below:
If you wish to know which tables in your database are responsible for this database size, you can run the following query that will show the table size from largest to smallest. System tables are also included. The size is displayed in MB.
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
ORDER BY 2 DESC