Can't delete orphaned Azure Arc - SQL Server databases (Resource not found)

Omar Saleh 0 Reputation points Microsoft Employee
2025-06-17T20:54:56.1633333+00:00

I had an Azure Arc SQL server that's using my own machine. I deleted it along with contained DBs. Somehow the server got deleted but not the DBs. Now, I have a bunch of DBs sitting in Azure portal that are pointing to nothing (Resource not found.)I do not have any Azure Arc Data Controller running (none exists.) And I can't even click and view the DB to see whether there's a lock or not. But I never create locks on my DBs anyways, so I don't think that's the case. It's been like this for a couple of days, so I don't think it's still running in the background due to the size of the DBs. they are not that big. Maximum 40GiB.

Azure Arc
Azure Arc
A Microsoft cloud service that enables deployment of Azure services across hybrid and multicloud environments.
525 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Vinod Pittala 3,695 Reputation points Microsoft External Staff Moderator
    2025-06-18T06:00:04.9833333+00:00

    Hello Omar Saleh,

    Since you mentioned that the databases are still showing in the Azure portal, it might be necessary to manually delete these orphaned resources.

    To delete these orphaned Azure Arc-enabled SQL databases, you can try the following steps:

    1. Ensure that the resource group where the databases were located is still intact. If it exists, you can try deleting the specific databases from that resource group.
    2. If you cannot delete the databases through the Azure portal, you can use the Azure CLI to attempt to delete them. You can run the following command, replacing the placeholder values:
         az resource delete --name <database name> --resource-type Microsoft.AzureArcData/sqlManagedInstances --resource-group <resource group name>
      
    3. Although you mentioned that you don't think there are any locks, it might be worth double-checking the resource group or subscription settings for any locks that could prevent deletion.

    Refer the below doc to get the insights for the deletion process.

    https://learn.microsoft.com/en-us/azure/azure-arc/data/uninstall-azure-arc-data-controller

    Please let me know if you have any concerns regarding the same.

    Click Upvote it if the provided information helps your query.

    Thanks

    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.