0
votes

As snowflake documentation, I need ownership and rights to drop any object.

So someone created a user account using accountadmin role (owner of the account). When I try to delete it or transfer ownership using owner role, I can't.

Can you tell me where am I wrong ?

USE ROLE ACCOUNTADMIN;

DROP USER "[email protected]";

User '"[email protected]" ' does not exist or not authorized.

If I perform some tests with the same account :

USE ROLE ACCOUNTADMIN;

CREATE USER "[email protected]";

User with login name '[email protected]' already exists.

If I try to create and delete users with this account...

USE ROLE ACCOUNTADMIN;

CREATE USER "[email protected]";

User [email protected] successfully created.

DROP USER "[email protected]";

[email protected] successfully dropped.

Thank you in advance, I become mad with this problem :)

Regards.

2
What role are you using(in your snowflake session) when you run the sql in your question? Does this also happen in the web interface? (docs.snowflake.net/manuals/user-guide/…) Keep this in mind: if the user wsa a custom role, the role must be granted to the Accountadmin docs.snowflake.net/manuals/user-guide/…Username784792
it is wierd i can't even see grants to this user but I can see this user when i perform show users ... even with accountadmin role which is the owner.Jonito

2 Answers

1
votes

Finally, this command worked! I have been able to drop users after that.

Edited: ALTER SESSION UNSET QUOTED_IDENTIFIERS_IGNORE_CASE;

0
votes

Most likely the ACCOUNTADMIN doesn't own the user. I believe that only the owner can DROP. Run:

SHOW USERS LIKE '[email protected]'

This will show you what role owns the user. Use that role to drop the user.