sql-serverazure-sql-databaseazure-elasticpool

Azure SQL Server Error : The elastic pool has reached its storage limit. The storage usage for the elastic pool cannot exceed (204800)


When I am trying to update or insert multiple rows from the application or directly sql server database, I am getting the error as below.

Msg 1132, Level 16, State 1, Line 1 The elastic pool has reached its storage limit. The storage usage for the elastic pool cannot exceed (204800) MBs.

I do not know how to handle this. Please help.


Solution

  • You should proactively check the current size quota for your databases, to make sure it is set as expected. To do this, the following statement can be used in the context of the target database:

    SELECT DATABASEPROPERTYEX(DB_NAME(), 'MaxSizeInBytes');
    

    To solve this issue scale up to the service objective with a larger maximum size quota, explicitly change the quota to match the maximum by using the ALTER DATABASE … MODIFY (MAXSIZE = …) command as shown above (unless a lower quota is desired to guarantee being able to scale down in the future). The change is executed in an online manner.

    ALTER DATABASE DB1 MODIFY (MAXSIZE = 10 GB);
    

    On this documentation you will find a table that shows the resources available at each service tier, including the maximum storage.