cant delete resource group due to master database

ChrisWork 1 Reputation point

SQL server associated with it has already been removed when the delete resource group was run.

Db delete error

400 Client Error: Bad Request for url...

Azure SQL Database
{count} votes

2 answers

Sort by: Most helpful
  1. Manu Philip 14,551 Reputation points MVP

    Hello @ChrisWork,

    Connect Az with PowerShell and check the resources still presented in your tenant. If there are still connected resources, you can't delete the RG until the resources are being deleted. So, delete the associated resources and finally delete the RG

     Get-AzResource -ResourceGroupName "RG Name"
     Get-AzResource -ResourceId "Resource ID" | Remove-AzResource 

    Finally remove the RG

     Remove-AzResourceGroup "RG Name"

    Please mark as "Accept the answer" if the above steps helps you. Others with similar issues can also follow the solution as per your suggestion



  2. Ronen Ariely 14,646 Reputation points MVP

    Hi Chris

    According to the entire information which you provided in the thread, it seems like your account have mishmash information. You should open a ticket from your subscription so the Azure support team will be able to examine your specific account. This is not a generic issue which we can probably solve in the forum but something which will require further information and probably manually fix.

    More information...

    You should not be able to create a database named master since there is already a database with this name which created for you in each logical server which you have.

    You should not be able to see the master database in the portal since it is a system database and not user database.

    If the image you provided shows all the resources in the resource group (assuming there no filter for example) then if there is any Azure SQL Database as we can see in the image then we should have seen the Azure SQL Server as well, but it is not there.

    You should remember that the Azure SQL Server is not a real SQL Server instance but a logical entity which is managed by the Azure Engine which let you use it like a real master in a physical server instance.

    It is possible that there is a mishmash with the logical entities as a result of a bug and therefore, you came to a strange situation like this. In order to examine the issue someone will probably need to examine your subscription in more deep.

    You should probably open a support ticket from your subscription.

    0 comments No comments