Try to shrink the database before scaling down.
DBCC SHRINKDATABASE (N'db1')
DBCC SHRINKFILE (log, 0)
If you have reduced the size already, try to move it to another region or subscription and then move it back to the original.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have an Azure database that is using 25MB. Its max storage is 10GB. I am trying to reduce this to 1GB but the operation keeps failing. It is a Serverless General Purpose vCore database. Under Notifications it always comes up as an ongoing operation but is always stuck at 1%. The error message is the following: Scale database error Failed to scale from General Purpose - Serverless: Standard-series (Gen5), 1 vCore, 10 GB storage, zone redundant disabled to General Purpose - Serverless: Standard-series (Gen5), 1 vCore, 1 GB storage, zone redundant disabled for database: sqldb-locumpro-staging-001. Error code: . Error message: The operation timed out and automatically rolled back. Please retry the operation.
Try to shrink the database before scaling down.
DBCC SHRINKDATABASE (N'db1')
DBCC SHRINKFILE (log, 0)
If you have reduced the size already, try to move it to another region or subscription and then move it back to the original.
Thanks for your question. I found a community document that has details about the error "Scale database error Failed to scale from General Purpose - Serverless" you mentioned. Could you please have a look to see if your database has any of the mentioned features. https://techcommunity.microsoft.com/t5/azure-database-support-blog/learning-from-expertise-8-why-cannot-move-sql-database-from/ba-p/3054270 Thank you!
@Trystan Wilcock Same situation could happen with any database in SQL DB. It’s possible that the underlying file size grew (which occurs automatically) due to data growth, and then data got deleted, but the file size didn’t shrink (which doesn’t occur automatically). In this situation, the larger file size can conflict with the lower max database size and prevent reducing the database max size. This article describes how to assess and reduce file size to unblock decreasing the data max size: Azure SQL Database file space management - Azure SQL Database | Microsoft Learn If that does not help. I would suggest to kindly open a support ticket so we can further investigate and troubleshoot. Please comment below and let me know the result. We will be more than happy to assit you further. Regards, Oury