Reputation: 31
Azure Database cannot reduce the sizing from 750 to 500 GB.
Overall sizing after I checked in the Azure dashboard.
The validation message when I reduce the sizing:
Message is
The storage size of your database cannot be smaller than the currently allocated size. To reduce the database size, the database first needs to reclaim unused space by running DBCC SHRINKDATABASE (XXX_Database Name). This operation can impact performance while it is running and may take several hours to complete.
What should I do?
Best Regard
Upvotes: 3
Views: 3720
Reputation: 776
I got this error via CLI after also disabling read scale and the solution was to remove --max-size 250GB from command:
az sql db update -g groupname -s servername -n dbname --edition GeneralPurpose --capacity 1 --max-size 250GB --family Gen5 --compute-model Serverless --no-wait
Upvotes: 0
Reputation: 23151
If we want to reduce the database size, we need to ensure the number of databse size is larger than the number of the Allocated space
you set. Now, according to your need, we should reclaim unused allocated space. Regarding how to do it, we can run the following command
-- Shrink database data space allocated.
DBCC SHRINKDATABASE (N'db1')
For more details, please refer to the document
Upvotes: 1