Delete a SQL Elastic Pool

Rob Marsh 0 Reputation points
2025-02-26T15:05:02.0633333+00:00

F&*k me, this support process is diabolical! I have managed to:

  1. Reopen an old support ticket
  2. Somehow create a new support ticket (no idea how I did that)
  3. Finally found a post mentioning that MS have removed Email/Phone support from Developer tier, so thought I would try here too!

I have created an Elastic Pool in Azure, but I have assigned no databases to it. I created it because it wouldn't give me options to pause the serverless VCore pool like it does when you create a serverless VCore database. I wanted to see if it gave me the option to configure pause settings once it was created (it didn't by the way).

Anyway, now I have created an expensive elastic pool that is providing zero benefit, so I need to delete it. I get an error message preventing the delete because of a lock that is on the SQL Server. I don't want to risk deleting the server by removing that lock. I don't want to delete the server or any of the databases on that server, just the redundant elastic pool that was created with zero assigned databases.

Thanks

Azure SQL Database
{count} votes

1 answer

Sort by: Most helpful
  1. Alberto Morillo 34,546 Reputation points MVP
    2025-02-26T15:18:43.2133333+00:00

    Try removing it using Azure CLI:

    az sql elastic-pool delete --name <elastic-pool-name> --resource-group <resource-group-name> --server <logical-server-name>
    

    If you are still not allowed, you can disable the lock temporarily.

    az lock delete --name <lock-name> --resource-group <resource-group-name>
    

    And reapply it after removing the elastic pool.

    az lock create --name <lock-name> --resource-group <resource-group-name> --lock-type Delete --resource <resource-id>
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.