Server name has already been used after you deleted it


Symptoms:

after you delete Azure SQL server, you are trying to create the same server name in a different subscription you own

the server creation process failed with error 60080 – Server name has already been used

Cause:

This happen because we keep the server name for couple of days in case the original subscription still needs the server name and remove it by accidentally.

in this time period only the original owning subscription can recreate the server name again.

 

 

 


Comments (9)

  1. Josh Graham says:

    WTF, mate?

    This might work well for people who accidentally clicky-click around the portal. It doesn’t work well for those using infrastructure-as-code to declare infrastructure and environments where regular destroy / recreate is par for the course.

    Can we have a “no, seriously, I know what I’m doing, delete it now” flag when deleting the resource by not-the-portal-UI?

    Could it be that if it’s deleted and then a new one created by the same subscription it is simply created afresh?

    1. Hi Josh,
      if you want to re-create the server again in the same subscription it will be recreated immediately with no limitation

      if you want to immediately create the server on another subscription, you can simply move the server to the other subscription
      see here how to do it: https://blogs.msdn.microsoft.com/azuresqlemea/2016/07/05/how-to-move-azure-sql-server-to-another-subscription/

      so you can either re-create, or move the server to another subscription immediately.
      I hope this cover all your needs, please let me know if you have another question.

      1. Scott says:

        I agree that when deploying with IaC, this can be a bit restrictive. Is there any way around this? Since we’ve already deleted the original resource, there’s no way to move it. It would be nice to just recreate on the fly in another subscription.

        Thanks.

        1. To workaround this you need to recreate the same server on the original subscription and then move it to the destination subscription.

  2. RJ Anderson says:

    I’m toying with ARM template deployment from powershell. This is all taking place within one subscription, but when I delete the resource group and try to recreate it, I get an error on SQL Server Creation.

    New-AzureRmResourceGroupDeployment : 1:51:17 PM – Resource Microsoft.Sql/servers ‘SQLServer005’ failed with message ‘Server name ‘episerver005′ has already been used.’

    1. as long as you are using the same subscription ID you should be able to drop and create the same server.
      try to check if the drop is completed before you initiate the create request.
      please share the details here or open support request to get out team assistance with that.

      1. Jacob Golden says:

        I’m using the portal and deleted a database, server and resource group…trying to create the server again and getting the same message. So it definitely isn’t working as you described.

        1. Hi Jacob, if you can give me more information about your server name I can review the logs to find the reason. probably you experience something else if this is all happen in the same subscription.

  3. Fredrik Bertilsson says:

    Hi, I’d really like to know for how long you actually reserve the name. Yochanan, could you find out and post the current value? Anyone have some experience here?

Skip to main content