2
votes

Executed this statement while using ACCOUNTADMIN role: GRANT CREATE WAREHOUSE ON ACCOUNT TO ROLE DATABASE_ADMIN;

However when I use DATABASE_ADMIN role and then execute create warehouse statement, it gives me following error: SQL access control error: Insufficient privileges to operate on account 'XXXX'

What am I missing here?

1

1 Answers

3
votes

The most common problem I've run into with this is that the Snowflake web IDE actually has two role selectors. The one in the top right is your role when dealing with the interface, but each sheet has their own role as well.

Try adding an explicit use statement before your create.

use role DATABASE_ADMIN;
create warehouse MY_WAREHOUSE ...;