In mssql2005 when I want to get the size of a table in MBs, I use EXEC sp_spaceused 'table'.
Is there any way to get space used by a particular table in SQL Azure using some query or API?
Refer this blog :http://dunnry.com/blog/CalculatingTheSizeOfYourSQLAzureDatabase.aspx
select sum(reserved_page_count) * 8.0 / 1024 [SizeInMB]from sys.dm_db_partition_statsGOselect sys.objects.name, sum(reserved_page_count) * 8.0 / 1024 [SizeInMB]from sys.dm_db_partition_stats, sys.objectswhere sys.dm_db_partition_stats.object_id = sys.objects.object_idgroup by sys.objects.nameorder by sum(reserved_page_count) DESC
sum(reserved_page_count) * 8.0 / 1024 [SizeInMB]
sys.objects.name, sum(reserved_page_count) * 8.0 / 1024 [SizeInMB]
sys.dm_db_partition_stats.object_id = sys.objects.object_id
group by sys.objects.name
order by sum(reserved_page_count) DESC
At first, you will get the size of your database in MB and the second one will do the same, just break them out for each of the object in your Database ordered from largest to smallest.
Certification in Digital Marketing |
Certification in Big Data Analytics |
Certification in Cloud & Devops |
Certification in Full Stack Web Development
Big Data and Data Science Master’s Course |
Data Science Architect Master’s Program |
Cloud and DevOps Architect Master’s Course |
Artificial Intelligence Engineer Master’s Course |
Microsoft Azure Certification Master’s Training
Data Science Course Online |
Big Data Hadoop Certification Training |
Machine Learning Course Online |
Artificial Intelligence Course and Training |
Salesforce Certification Training: Administrator and App Builder |
Tableau Training and Certification Course |
Python Data Science Course & Training |
Ethical Hacking Course |
Business Analyst Course |
Courses in Cyber Security
© COPYRIGHT 2011-2021 INTELLIPAAT.COM. ALL RIGHTS RESERVED.
Download Salary Trends Now !
Learn how professionals like you got up to 100% Salary Hike.