When trying to drop a user "xyz" in a Redshift database, I get the error message:
user 'xyz' cannot be dropped because the user owns some object.
According to the documentation:
If a user owns an object, first drop the object or change its ownership to another user before dropping the original user
How do I know which objects (schemas, tables, views, UDFs?, ...) are owned by the user?
In my case, the user didn't own any tables or views or anything else that I could find. I guessed correctly that having been granted a privilege meant the user "owned" something, because I fixed the problem with this:
revoke all privileges on database some_database_name from some_user_name
after which the drop user
command worked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With