Accidentally deleted an Azure SQL DB?

Okay honestly I have done this once. I have deleted Azure SQL Databases and then try and find the quickest way to recover. The Azure portal is actually pretty good when it comes to deleting resources, for example it will usually ask you to re-type the name of the resource to confirm deletion, so you can tell what a bad mistake I made.

Let’s look at how to delete a database then recover it. Simply navigate to the “logical” SQL Server and find the delete option within the portal.

DeleteDB

Here is the warning I mentioned earlier on.

TheWarning

I type the name to confirm and then whoops, I realise the mistake.

donemist

So what does one do? Navigate to the main left menu bar within the SQL Server and under settings look for “Deleted Databases”.

deleteddatabase

Here you will be presented with the deletion times for the various databases. Select the one of interest (in our case CommDB). Note the restore point time.

restorepoints

Click OK and you will have the deleted database back.  Hopefully this post will help you out one day! Do not forget to the alter the name of the database to the original name.

 

2 thoughts on “Accidentally deleted an Azure SQL DB?

  1. Pingback: Undeleting A Deleted Azure SQL Database – Curated SQL

  2. Pingback: Szumma #129 – 2018 39. hét – ./d/fuel

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s