Scale Azure SQL database error - cannot scale down, stuck at 1% then timeout

Trystan Wilcock 0 Reputation points

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.

Azure SQL Database
{count} votes

3 answers

Sort by: Most helpful
  1. Alberto Morillo 33,001 Reputation points MVP

    Try to shrink the database before scaling down.

    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.

  2. Rahul Randive 8,751 Reputation points Microsoft Employee

    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. Thank you!

    0 comments No comments

  3. Oury Ba-MSFT 16,891 Reputation points Microsoft Employee

    @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