Azure Arc SQL Server Resource still showing up

Daniel Woodhouse 0 Reputation points
2024-10-15T23:27:15.3566667+00:00

I installed SQL 2022 developer and enabled the Azure extensions option and selected the appropriate resource group for development in my azure subscription. Well I noticed it created a bunch of artifacts in the resource group. Well I followed the steps to uninstall the SQL extension and deleted the SQL instance but when I go back to the development resource group and delete the databases they remove for about 5 minutes and then pop back up. When you click on them I get a 404 resource not found.

Steps I took

https://github.com/microsoft/sql-server-samples/tree/master/samples/manage/azure-arc-enabled-sql-server/uninstall-azure-extension-for-sql-server

Not sure what else to do?

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

2 answers

Sort by: Most helpful
  1. Vinodh247 34,661 Reputation points MVP Volunteer Moderator
    2024-10-16T05:27:49.41+00:00

    Hi Daniel Woodhouse,

    Thanks for reaching out to Microsoft Q&A.

    It seems like there might be some residual or orphaned resources left in azure after uninstalling the SQL extension and deleting the SQL instance. Based on the steps you’ve already taken, here are a few things you could try to resolve the issue:

    1. Check Azure Arc Resource Management:
    • Go to the Azure Arc section in the Azure portal and see if the SQL Server resource is still being tracked under Azure Arc for SQL Servers.
    • If it’s still present, try to disconnect or remove the Arc-enabled SQL Server resource from Azure Arc explicitly.
    1. Check for Resource Locks:
    • Navigate to the Resource Group where the databases are appearing.
    • Check if there are any locks on the resource group or specific resources (under Settings > Locks). These locks might be preventing the deletion.
    • If locks exist, you’ll need to remove them before deleting the resources.
    1. Forcefully Remove Resources via Azure CLI or PowerShell:
    • If the resources keep reappearing after deletion, try using Azure CLI or Azure PowerShell to forcefully delete them.

    az resource delete --ids <resource-id> Remove-AzResource -ResourceId "<resource-id>" -Force

    1. Check Resource Explorer:
    • In the Azure portal, navigate to Resource Explorer to investigate the status of the resources.
    • Go to All services > Resource Explorer, find the resource that keeps reappearing, and inspect its details. You may be able to get a clearer view of the resource’s state and dependencies.
    1. Check Activity Logs:
    • Go to the Activity Log of your Azure subscription and check for any automated operations that might be recreating the resources (such as a policy or automation script).
    • Look for any clues related to why the resources are being recreated after deletion.

    Please 'Upvote'(Thumbs-up) and 'Accept' as an answer if the reply was helpful. This will benefit other community members who face the same issue.


  2. SSingh-MSFT 16,371 Reputation points Moderator
    2024-10-17T04:57:55.6166667+00:00

    Hi Daniel Woodhouse,

    Welcome to Microsoft Q&A forum.

    As I understand, you are unable to confirm that Azure resource is deleted as it appears in the Azure portal.

    If you’re seeing a 404 error when clicking on these "ghost" resources, it suggests that the resources may have been deleted but are still appearing in the UI.

    Clear the browser cache or try accessing the resource group in Incognito Mode or using a different browser.

    Also, confirm whether the resources are listed using Azure CLI:

    az resource list --resource-group <resource-group-name>

    Go to the resource group in Azure Portal and review the dependencies for each of the resources you are trying to delete. Ensure that there are no resources or extensions that depend on them, which might be preventing the deletion.

    Let us know if this helped or we will assist you further.

    Awaiting your reply.

    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.