Unable to delete resource group

Andrew Duffy 20 Reputation points
2024-05-14T00:45:02.69+00:00

Hi, I can't delete a resource group, it's complaining that it can't delete an underlying SQL server.

There is no such server visible in the portal nor is there when I do az sql server list.

"Failed to delete resource group myapp-develop: Deletion of resource group 'myapp-develop' failed as resources with

identifiers 'Microsoft.Sql/servers/myapp-develop' could not be deleted. The provisioning state of the resource group

will be rolled back. The tracking Id is '638a0419-8a98-49b5-a02b-60f82f5ae482'. Please check audit logs for more details.

(Code: ResourceGroupDeletionBlocked) The request to delete the resource 'Microsoft.Sql/servers/myapp-develop' failed.

subscription id '{mysubscriptionid}', activity id '2726c97f-1946-48ca-b8e2-5db1cec1ba3a', request

correlation id '638a0419-8a98-49b5-a02b-60f82f5ae482'. (Code: ResourceDeletionFailed,

Target: /subscriptions/{mysubscriptionid}/resourceGroups/myapp-develop/providers/Microsoft.Sql/servers/myapp-develop)"

Also "Please check audit logs for more details." - where is that? in the audit logs service?

Azure SQL Database
0 comments No comments
{count} votes

Accepted answer
  1. Sam Cogan 10,322 Reputation points MVP
    2024-05-14T07:05:05.0933333+00:00

    If there is no SQL server visible in the portal or CLI, then you would need to raise a support request through the portal to have it investigated. You can raise a billing support request, which are free, as you are being charged for resources that you cannot delete.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. ShaktiSingh-MSFT 14,076 Reputation points Microsoft Employee
    2024-05-14T08:33:33.0766667+00:00

    Hi Andrew Duffy •,

    Welcome to Microsoft Q&A forum.

    As I understand, you ae unable to delete Resource Group because of error related to existing SQL Server which you could not find in Azure Portal.

    Could you please try opening Azure CLI and execute commands like:

    az sql server list

    https://learn.microsoft.com/en-us/cli/azure/sql/server?view=azure-cli-latest#az-sql-server-list

    This will show up the server if present in your RG.

    Then use command:

    az sql server delete

    https://learn.microsoft.com/en-us/cli/azure/sql/server?view=azure-cli-latest#az-sql-server-delete to delete server.

    If above also does not show up the server, I would recommend you to please file a support ticket for deeper investigation and in case if you don't have a support plan, do let us know here so that we can check on other options to unblock you.

    Thanks

    0 comments No comments