Getting Started With Azure SQL - Part Three

Introduction

Just like create and connect, deleting resources also plays a vital role in application development, at times. I would recommend you read the previous parts, Part One and Part Two before continuing this part.

In this tutorial (Part 3), we will cover the following-

    1. How to delete Azure SQL Database
    2. How to delete Azure SQL Server

How to delete Azure SQL Database

There are different ways of deleting Azure SQL Database.

Option 1 - Using Microsoft Azure Portal

Let's assume that you have an Azure Portal Account. If not, create your free Azure account.

Also, we are assuming that you already have created an Azure SQL database, if not, do create one. Go to ‘How to Create Azure SQL database’ article for methods to create.

Once you’re done with creating Azure account & Azure SQL database, let’s start.

Here, I have created Azure SQL database name ‘creattodelete’.

Go to SQL Database blade and select database to be deleted => Overview

At the top-right corner, there will be an option for Delete.

Click on Delete.

Warning message about deletion will appear on the screen.

Click on Yes.

Refer to the below image.



Once deleted, you will be notified by the below message.



The notification indicates, we are successfully done with our Azure SQL deletion.

Option 2 - Using SQL server Management Studio

Here, I have created an Azure SQL Database named ‘test1’ under Azure SQL server ‘codewithkasam’.

Connect server using SSMS

Right click on the database that needs to be deleted, and click Delete from options available, as shown in the below image.


 The following window will pop-up. Verify and click OK.



Whoa! SQL database got deleted.

Below is object explorer, after deletion.


Note- We can very well restore this deleted Azure SQL database. Click here to explore how.

How to Delete Azure SQL Server

Go to Azure SQL server => Click on Server Name

On screen, top section click on Delete.

Warning message stating, this action is irreversible will be displayed, along with prompting user to write SQL server name, for double verification purpose.

Note- If Azure SQL server is deleted, all Azure SQL databases associated with the server are deleted and cannot be restored again.

Re-enter name of Azure SQL server and Click Delete.



Will be notified stating successful deletion of server.



Summary

Finally, after successful creation, we saw how, by a few easy steps and verification, we were able to delete our Azure SQL server and Azure SQL database.

Up Next
    Ebook Download
    View all
    Learn
    View all