How to calculate the used database space in SQL Azure

0 votes

I found in the documentation that In SQL Azure each database has a size limitation. In order for my service to not suddenly come to a halt I'd like to be able to programmatically find the current maximum size and current actually used space

So, How do I find the current maximum allowed size and current actually used space in a SQL Azure database?

Mar 5, 2019 in Azure by datageek
• 3,090 points
1,116 views

1 answer to this question.

0 votes

I don't think its possible to find maximum allowed space. But you can calculate used space via dynamic management views:

SELECT SUM(reserved_page_count)*8.0/1024
FROM sys.dm_db_partition_stats; 

Hope this helped!

answered Mar 5, 2019 by Archana
• 5,640 points

Related Questions In Azure

0 votes
1 answer

How to query between databases in SQL Azure Database Server?

SQL Azure supports cross database queries: https://azure.microsoft.com/en-us/blog/querying-remote-databases-in-azure-sql-db/ Hope this ...READ MORE

answered Apr 9, 2019 in Azure by Prerna
• 1,960 points
12,834 views
0 votes
1 answer

How to create table in Azure SQL Database?

Creating tables in Azure SQL Database: In Object Explorer, ...READ MORE

answered Jan 22, 2020 in Azure by Sirajul
• 59,230 points
36,960 views
0 votes
1 answer

How to export the template used for a deployment in Azure?

Hi@akhtar, You can export the deployment available in ...READ MORE

answered Nov 16, 2020 in Azure by MD
• 95,460 points
702 views
+1 vote
10 answers

How can the NuGet packages be used in Azure Functions?

Yes! Although the Azure Functions portal does ...READ MORE

answered Jun 8, 2018 in Azure by club_seesharp
• 3,450 points
16,782 views
0 votes
1 answer

How to determine the number of messages in an Azure Services Bus Queue?

You will get error when you try ...READ MORE

answered Jun 12, 2018 in Azure by null_void
• 3,220 points
4,524 views
0 votes
4 answers

How can I rename a SQL Azure database?

This command serves the purpose ALTER DATABASE [oldname] ...READ MORE

answered Nov 30, 2018 in Azure by Abhinav
2,245 views
0 votes
1 answer

Azure Table or SQL Azure for storing app data.

Azure tables are cheaper, simpler and scale ...READ MORE

answered Jul 9, 2019 in Azure by Perry
• 17,100 points
726 views
0 votes
1 answer

What is Azure SQL database? How to connect to Azure SQL database?

Azure SQL Database is a general-purpose relational ...READ MORE

answered Jan 13, 2020 in Azure by Sirajul
• 59,230 points
1,441 views
0 votes
1 answer

What is sql azure?

SQL Azure is Microsoft’s cloud database service. Based ...READ MORE

answered Jan 20, 2020 in Azure by Sirajul
• 59,230 points
1,440 views
0 votes
1 answer

Which is better: Azure Blob or Azure Table?

The best solution is blob storage with ...READ MORE

answered Mar 5, 2019 in Azure by Archana
• 5,640 points
624 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP