Azure – Cant delete Azure Database

azureazure-sqldatabasesql

Created this a database from a backup.

I want to delete this database because I selected the incorrect backup. When trying to delete the database I get the following error:

Failed to delete the database: [DBNAME].
ErrorCode: 400
ErrorMessage: Cannot use reserved database name '[DBNAME]' in this operation.
This is an SQL database.

Steps taken to delette database:

  1. Open Azure Portal.
  2. Select Database ([DBNAME]).
  3. Click delete button.
  4. Get above mentioned error.

Error

Error

Connecting with SSMS: The Database that I want to delete is not there
DB not there

Best Answer

It sounds like you have used a reserved word in the DB name and for some reason the deletion process in the Azure portal isn't dealing with this. A couple of ways to deal with the immediate issue:

  • Delete the database through SQL Server Management Studio (SSMS)
  • Use SSMS to rename the database to something without a reserved word and then delete it through the portal

I would also suggest raising an bug with MS as the portal should either handle this, or prevent you from creating the DB in the first place.

Related Topic