Article ID: 129815, created on Nov 7, 2016, last review on Nov 7, 2016

  • Applies to:
  • Operations Automation 5.5

Symptoms

Drop database user Some_DB_Name on host XX.XX.XX.XX task fails with the following output:

PgSQL API error: ERROR: role "Some_DB_Name" cannot be dropped because some objects depend on it
DETAIL: XXX objects in database Some_DB_Name

Cause

Mentioned database contains schema or role which is owned by existing user. This error is returned by PSQL during attempt to drop the user. This case has been submitted to the Maintenance Team as feature request with id POA-90098: Error when dropping a database user when a user owns a schema or specific custom role.

Resolution

The following workaround can be used to fix the task:

  1. Remove the database manually:

    postgres=# DROP DATABASE Some_DB_Name;
    DROP DATABASE
    
  2. Restart the failed task.

Search Words

objects in database

The database principal owns a schema in the database, and cannot be dropped

failed task

Drop database user

Error when droping a database user when a user owns a schema or specific custom role

cannot be dropped because some objects depend on it

5356b422f65bdad1c3e9edca5d74a1ae caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07 5b048d9bddf8048a00aba7e0bdadef37 2554725ed606193dd9bbce21365bed4e

Email subscription for changes to this article
Save as PDF