i have deleted database and now i want to restore in azure sql service

Shobhit Joshi 0 Reputation points
2025-11-06T13:26:44.2133333+00:00

Hi,

We have deleted our database long time back (< 1 year). Can someone help me to how to restore it back in azure portal. Let me know if you need more details

Azure SQL Database
{count} votes

2 answers

Sort by: Most helpful
  1. Nathan Roberts (SN) 8,036 Reputation points Volunteer Moderator
    2025-11-09T14:38:50.5366667+00:00

    Hey there, Shobhit Joshi

    This depends if you have created backups of your SQL server. One method on doing this can be found in this article here: https://learn.microsoft.com/en-us/sql/relational-databases/backup-restore/restore-a-database-backup-using-ssms?view=sql-server-ver17

    The difficulty you may have is that you have deleted the SQL server. Once you delete a server, and have left it for a prolonged period of time, it may be unrecoverable. If you are unable to recover your server, then this won't be possible. Unless someone from the community has other ideas on how to recover a server.

    My advise would be to make recovery points each month or ever two weeks, so that if something needs to be recovered, then it can. This is what I do with my servers.

    Hope this helps,
    Nathan

    0 comments No comments

  2. Kalyani Kondavaradala 3,540 Reputation points Microsoft External Staff Moderator
    2025-11-10T14:42:54.5366667+00:00

    Hi Shobhit Joshi,

    Thanks for approaching on Microsoft Q&A!

    You trying to restore a database in Azure SQL Database that was deleted quite a while ago. Unfortunately, the ability to restore a deleted database depends heavily on the backup retention policies in place when the database was deleted.

    Here’s what you can try:

    1. Check Retention Period: The Azure SQL Database service automatically backs up databases, but the retention period varies by service tier. The default is usually 7 to 35 days. If your database was deleted more than that, unfortunately, it cannot be restored.
    2. Restore from Deleted Databases:
      • Go to the Azure portal and navigate to the Azure SQL Server where the database used to be.
      • Select the Deleted databases blade.
      • If you see your database listed, select it and follow the prompts to create a new database:
      • Specify whether it's a Point-in-Time or Long-term backup retention restore.
      • Choose the restore point or backup you need.
      • Give a unique name for the new database and click Create.
    3. Use PowerShell or Azure CLI: If you prefer scripting:
      • With PowerShell, use:
             Get-AzSqlDeletedDatabaseBackup -ResourceGroupName "YourResourceGroup" -ServerName "YourServer"
             
        
      • After confirming it is in the list, restore with:
             Restore-AzSqlDatabase -FromDeletedDatabaseBackup -DeletionDate "DeletationDate" -ResourceGroupName "YourResourceGroup" -ServerName "YourServer" -TargetDatabaseName "NewDatabaseName".
        
      • For Azure CLI, check:
             az sql db list-deleted --subscription [subscription ID] --resource-group [Resource Group Name] --server [Server Name]
             
        
    4. Long-Term Retention (LTR): If you had LTR configured before the database was deleted, you might be able to restore from those backups.

    Please refer the Microsoft document for more details.

    https://learn.microsoft.com/en-us/azure/azure-sql/database/recovery-using-backups?view=azuresql&tabs=azure-portal

    I hope this help, let us know if you have any further queries on this.

    Thanks!

    Kalyani


Your answer

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