Reputation: 13
After I created a Role and User as Read only for specific tables, The user gets an error: SQL access control error: Insufficient privileges to operate on warehouse And I can see that the Warehouse is suspended for the Role that I created for him. What am I forgetting ?
I created with this code:
GRANT USAGE ON WAREHOUSE DEV_DWH TO ROLE READ_R_AND_D;
GRANT USAGE ON DATABASE "Z_DWH_DEV" TO ROLE READ_R_AND_D;
GRANT USAGE ON SCHEMA "Z_DWH_DEV"."DWH" TO ROLE READ_R_AND_D;
GRANT SELECT ON TABLE "Z_DWH_DEV"."DWH"."FACT_DAILY" TO ROLE READ_R_AND_D;
grant role READ_R_AND_D to user EYAL;
Upvotes: 0
Views: 17440
Reputation: 1021
In order for the role to resume the warehouse - it needs to have to operate on the warehouse.
grant operate on warehouse DEV_DWH to role READ_R_AND_D;
This grants the role the ability to start, stop, suspend, or resume a virtual warehouse. Grants ability to suspend or resume a task.
Details: https://docs.snowflake.com/en/sql-reference/sql/grant-privilege.html#examples
Upvotes: 0
Reputation: 694
Is the warehouse set to auto resume? If not, you need further permissions, other than usage to resume it
Upvotes: 0