Azure SQL - dataspace used vs max dataspace

by mslot   Last Updated September 11, 2019 18:06 PM

I have a single Azure SQL database in Azure with the following database data space database data space

As I read the documentation: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-file-space-management the "Used space" will keep growing, and I myself need to shrink it. That is perfectly fine, and as expected. I can also see that the allocated space is a bit larger than the used space. This is how i hope it works:

  1. when used space is nearing the allocated space, some more space is allocated
  2. when used space is at max size we have no more space available thus we run out of space

I am a bit scared that I have misunderstood something and my database (and site) will stop working when used space is at allocated space. I am kind of new into the world of Azure.

It was something i just noticed today. I have a monitor set up to monitor data space used (in percent), and i will be alerted when it hit max. But i will never hit max if it doesn't grow beyond allocated space.



Answers 1


First of all, no need to worry as this is normal behaviour.

This part From msdocs on Data space allocated should make it clear

The amount of space allocated grows automatically, but never decreases after deletes. This behavior ensures that future inserts are faster since space does not need to be reformatted.

This space allocated grow automatically & will stay the same way when it grows out.

A usefull part of azure is that there are these little (!) marks on many settings.

enter image description here

These should point you in the right direction, the learn more points us to above linked page.


In short

when used space is nearing the allocated space, some more space is allocated

yes

when used space is at max size we have no more space available thus we run out of space

and yes

You can always get the possible size from ssms --> database properties:

enter image description here

Randi Vertongen
Randi Vertongen
September 11, 2019 18:05 PM

Related Questions


Updated August 29, 2019 08:06 AM

Updated February 25, 2017 13:06 PM

Updated May 24, 2017 14:06 PM

Updated July 23, 2018 16:06 PM

Updated January 03, 2019 16:06 PM