Is there a best practice on how to handle quota limits on sql azure? maybe some sort of autoincrease?
Asked
Active
Viewed 106 times
0
-
Not sure what you mean by "quota limits" - are you talking about the limits within your subscription? Or something else? Note: the notion of *quotas* is very specific to subscription limits. – David Makogon Dec 14 '17 at 19:13
-
Storage... how to handle when it reached my 1gb quota – HoBa Dec 14 '17 at 19:16
1 Answers
2
You can identify the size limit for the tier using below query:
SELECT Edition = DATABASEPROPERTYEX('db1', 'EDITION'),
ServiceObjective = DATABASEPROPERTYEX('db1', 'ServiceObjective'),
MaxSizeInBytes = DATABASEPROPERTYEX('db1', 'MaxSizeInBytes');
You can then monitor current database size of the database running the following query
select sum(reserved_page_count) * 8.0 / 1024 as "size in MB" from sys.dm_db_partition_stats
And you can issue an ALTER DATABASE statement scaling up the tier as shown below:
ALTER DATABASE [db1] MODIFY (EDITION = 'Premium', MAXSIZE = 1024 GB, SERVICE_OBJECTIVE = 'P15');

Alberto Morillo
- 13,893
- 2
- 24
- 30