How can I completely remove 'xyzh' Azure SQL managed Instance database from SSMS?

yirgalem asore 0 Reputation points
2025-06-02T13:43:17.2866667+00:00

The xyzh database in Azure SQL Managed Instance has already been dropped, but it still appears in the list under SQL Server Management Studio (SSMS) Object Explorer. When attempting to drop it again using the command 'DROP DATABASE [ xyzh] GO', an error occurs stating: 'The database " xyzh" on server "x" is already being dropped.' Although the database no longer exists in the Azure portal, its name still shows up in SSMS. Additionally, when trying to access it through SSMS, another error appears: 'Connections to this database are no longer allowed.' How can I completely remove Azure SQL managed Instance database from SSMS?

Azure SQL Database
{count} votes

2 answers

Sort by: Newest
  1. PratikLad 1,585 Reputation points Microsoft External Staff Moderator
    2025-06-04T17:19:17.5333333+00:00

    Hello yirgalem asore

    For Azure AQL managed instance whenever the drop database statement is executed in AZURE SQL MI, it internally performs the Tail Log Backup of that database. The database's drop operation had stopped and not progressing forward because the Tail Log Backup InProgress operation was preventing DB drop requests.

    To resolve this, verify the database is listed if you execute this PowerShell cmdlet

    
    Get-AzSqlInstanceDatabase -InstanceName "name" -ResourceGroupName "resourcegroupname"
    
    

    and if you see the database listed on the result of the PowerShell cmdlet, then use this other PowerShell cmdlet to remove the database.

    
    Remove-AzSqlInstanceDatabase -Name "Database01" -InstanceName "managedInstance1" -ResourceGroupName "ResourceGroup01"
    
    

    Also you can try by restarting the SSMS.

    If the issue persists, please don't hesitate to reach out for further assistance.


    I hope this has been helpful! Kindly consider upvoting the Answer if the information provided is helpful. This can assist other community members in resolving similar issues. Happy to help you.


  2. Olaf Helper 47,416 Reputation points
    2025-06-02T13:58:42.8133333+00:00

    A Azure Managed Instance is a server, not a single database.

    A Instance can have 1 - 1024 databases.

    So I don't understand what you want "to remove from SSMS" here, may can you explain it more detailed, please?


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.