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,050 points
60 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,600 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, 2019 in Azure by Prerna
• 1,940 points
794 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 in Azure by Sirajul
• 48,810 points
34 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
6,385 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
652 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
511 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
530 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, 2019 in Azure by Perry
• 17,090 points
71 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 in Azure by Sirajul
• 48,810 points
78 views
0 votes
1 answer

What is sql azure?

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

answered Jan 20 in Azure by Sirajul
• 48,810 points
22 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,600 points
47 views