How to delete an Azure Database for PostgreSQL flexible server

Christian Hageraats 20 Reputation points
2024-06-15T08:42:59.8133333+00:00

When attempting to delete an Azure Database for PostgreSQL Server, the error message "An error occurred deleting PostgreSQL server. Unknown error." is displayed. The resource is empty and there are no user databases. How can I resolve this issue and successfully delete the server?

Azure Database for PostgreSQL
0 comments No comments
{count} votes

Accepted answer
  1. Marius Grande Andersen 80 Reputation points
    2024-06-28T10:30:25.25+00:00

    For me, this issue was:

    Networking - Virtual network - check what vnet it is connected to.

    Open that vnet and make sure you don't have a DoNotDelete lock. Deleted that lock, and "Unknown error." dissapeared.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Rahul Randive 9,011 Reputation points Microsoft Employee
    2024-06-16T12:37:59.95+00:00

    Hi @Christian Hageraats

    Please check the status of the server on the overview page. Is it still showing as available or in a deleting state?

    Also, if you haven't tried using the CLI yet, please do so and see if it works.

    az postgres flexible-server delete --resource-group testGroup --name testserver

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

    Thank You!

    0 comments No comments