Azure SQL Database Restore Cancelled : Database Cannot Be dropped

Robson Soares 1 Reputation point
2022-04-13T08:05:49.413+00:00

I started a restore (point in time) of a Azure SQL Database and after long time running I decided to cancel the deployment.
The source is a S6 and set the target to S3 (database sizes are the same).
During the process I monitored using sys.dm_operation_status . After almost 2 hours the state changed to Cancelled with 100% complete.

After all the database is not listed on sql server (azure portal) but it is listed on my SSMS (18.11.1).

When I try to drop that database using T-SQL Drop Database I have an error message Database 'xxxxxxxx2022-04-12T16-20Z' does not exist.

Also I checked the sys.database. I see that database listed but it is the only row with field is_brocker_enabled = 0

If I try to delete using the SSMS interface I see the error

Cannot connect to sxxxxxxxxx.sql.database.windows.net.

===================================

Login failed for user '<token-identified principal>'. (.Net SqlClient Data Provider)

How can I remove that database? (I have all permissions to admin)

Best regards

Azure SQL Database
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Alberto Morillo 32,891 Reputation points MVP
    2022-04-13T10:09:08.31+00:00

    Sometimes this happens and it may take up to 72 hours to completely disappear from SSMS, but it eventually will disappear.

    Restore operations sometimes get stuck when trying to restore to a low level service tier (Basic, S0, S1 for example). So to avoid these issues in the future is better to restore to a higher service tier possible, once the restore is complete you can scale down the database to the desired service tier.

    0 comments No comments

  2. Robson Soares 1 Reputation point
    2022-04-13T10:30:58.15+00:00

    Hi Alberto. Thanks for your response. I think you are correct. I had similar issue in the past but the database disappeared quickly..

    Will wait.

    Best regards

    0 comments No comments

  3. Robson Soares 1 Reputation point
    2022-04-15T13:02:40.67+00:00

    Hi Alberto.

    That non restored database still in my SSMS. It is not on Azure Portal