Recover deleted sql server on azure.

Trevor Clendenin 0 Reputation points
2025-04-25T14:18:44.71+00:00

Need to recover deleted sql server on azure. The server was accidentally deleted and need to recover it.

Azure SQL Database
{count} votes

2 answers

Sort by: Most helpful
  1. PratikLad 960 Reputation points Microsoft External Staff
    2025-05-01T12:36:17.13+00:00

    Hello Trevor Clendenin

    Restore a deleted logical server in Azure SQL Database (Feature is in preview and is currently only enabled for certain subscriptions.)

    You can restore your deleted Azure SQL logical server using Restore-AzSqlServer PowerShell command.

    1. Sign in and connect to your Azure account.
    
    Connect-AzAccount  
    
    
    1. Select the desired subscription, replace <subscription-id> with the subscription name.
    
    Select-AzSubscription -Subscription "<subscription-id>"
    
    
    1. Run the restore command as follows. Replace <your-server-name> and <your-resource-group-id> with your deleted logical server's name and resource group ID.
    
    $servername = <your-server-name>
    
    $resourcegroup = <your-resource-group-id>
    
    Restore-AzSqlServer -ServerName $servername -ResourceGroup $resourcegroup
    
    

    Refer - Restore a deleted logical server (preview) - Azure SQL Database | Microsoft Learn

    If you require any further assistance, please do not hesitate to reach out.


  2. RahulRandive 10,401 Reputation points
    2025-05-03T14:01:54.2466667+00:00

    Hi @Trevor Clendenin

    If a server is accidentally dropped, there is currently no self-service option available for customers to recover it. Assistance from the Microsoft support team is required to attempt recovery.

    Please note that restoring a dropped Azure SQL Database server is not officially supported and any recovery efforts are made on a best-effort basis.

    Additionally, if a support case is raised more than 7 days after the server is deleted, recovery is not possible—even with support intervention.

    To help prevent accidental deletions in the future, we strongly recommend implementing resource locks on critical Azure resources to safeguard your infrastructure.
    https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/lock-resources?tabs=json

    Thank You

    0 comments No comments

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.