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 in Azure by datageek
• 3,040 points
34 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 by Archana
• 5,560 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.micros ...READ MORE

answered Apr 9 in Azure by Prerna
• 1,940 points
150 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
5,259 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
293 views
0 votes
1 answer

How to identify a deadlock in SQL Azure?

Monitoring of SQL Azure is more limited ...READ MORE

answered Jun 19, 2018 in Azure by club_seesharp
• 3,450 points
363 views
+1 vote
1 answer

How to copy Azure SQL database to a local development server?

Actually, there are multiple ways to do ...READ MORE

answered Jul 9, 2018 in Azure by null_void
• 3,220 points
256 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
417 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 8 in Azure by Perry
• 17,020 points
35 views
+1 vote
2 answers
0 votes
1 answer

What OS is Jenkins installed on Azure Virtual Machine?

Under Managed Jenkins there's a section called ...READ MORE

answered Apr 4, 2018 in DevOps & Agile by DareDev
• 6,810 points
45 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 in Azure by Archana
• 5,560 points
31 views