I'm trying to ascertain the log space limits, It seems that storage limit includes log space from the documentation. what about system databases - specifically tempdb included in the managed instance storage limit ?
1 Answers
All system (including tempDB) and user databases are included in storage size that is compared against the storage space. This means that both log and data files of tempdb are counted in instance size.
The following query returns total used instance size as sum of all database file sizes (including system database files) and this value must be less than the instance size:
select used_size_gb = sum(size*8.)/1024/1024 from master.sys.master_files
You can also compare used and max storage space using master.sys.server_resource_stats
view and this query:
select top 1
used_storage_gb = storage_space_used_mb/1024,
max_storage_size_gb = reserved_storage_mb/1024
from sys.server_resource_stats order by start_time desc
On General purpose there is one additional limit - size of tempdb cannot be greater than 24GB * number of vCores
See more details in documentation: https://learn.microsoft.com/en-us/azure/sql-database/sql-database-managed-instance-resource-limits#service-tier-characteristics

- 514
- 1
- 6
- 19

- 13,232
- 4
- 40
- 55