We have a serverless Azure SQL database that we can't drop from the portal or SSMS.

Dan Deluna 0 Reputation points
2025-02-18T14:17:44.1566667+00:00

I have reviewed the common solutions provided by the troubleshooter and none of them have resolved the issue.

Azure SQL Database
{count} votes

3 answers

Sort by: Most helpful
  1. Nandan Hegde 34,251 Reputation points MVP
    2025-02-18T14:35:16.2066667+00:00

    Can you please provide a screenshot of the database name?
    Also, can you try executing the below command by logging within the database and confirm whether it is still the issue :

    drop database [database name]
    

    In certain cases, when database names have some unique characetrs they cannot be deleted from portal directly


  2. Suwarna S Kale 786 Reputation points
    2025-02-18T15:20:04.6566667+00:00

    Hello Dan Deluna,

    Thank you for posting your question in the Microsoft Q&A forum.

    If you're unable to drop a serverless Azure SQL database from the Azure portal or SQL Server Management Studio (SSMS), please try executing command suggested by Nandan Hegde

    If problem still persist, you may try verifying some additional configurations as below to understand root cause:

    • The database might have active connections or sessions that are preventing it from being dropped. Run the following query in SSMS to identify active connections:
        SELECT * FROM sys.dm_exec_sessions WHERE database_id = DB_ID('YourDatabaseName');
                
      
    • If there are active connections, terminate them.
    • Check if the database is part of a replication or sync configuration (e.g., Azure SQL Data Sync), as it cannot be dropped until the configuration is removed. Long-running transactions or operations (e.g., backups, restores, or index maintenance) might be preventing the drop operation (run below query to check long-running transactions)
            SELECT * FROM sys.dm_tran_active_transactions;
      

      If the above answer helped, please do not forget to "Accept Answer" as this may help other community members to refer the info if facing a similar issue.

    0 comments No comments

  3. RahulRandive 10,226 Reputation points
    2025-02-19T22:49:00.26+00:00

    Sometimes, the drop database operation can be blocked if the database is in use. When initiating the drop, check if any other SPID is blocking the drop command.

    If it is, you may need to terminate that process and restart the drop operation. If you encounter any errors, please share them here for further clarification.

    Understand and resolve blocking problems

    Thank You.

    0 comments No comments

Your answer

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