Study FAQ
How do I fix a missing or unauthorized Snowflake warehouse in my session?
Also asked as 2
- Why does my Snowflake session say there is no active warehouse or deny access to one?
- How can I check the current warehouse and the USAGE grant before running Snowflake SQL?
Answer
For a statement that needs user-managed compute, check CURRENT_WAREHOUSE(), CURRENT_ROLE(), and CURRENT_SECONDARY_ROLES() in the failing session. If no warehouse is selected, run USE WAREHOUSE warehouse_name for an approved warehouse. If the selection is denied, confirm the warehouse name and ask the owner to verify that the active primary or secondary role hierarchy provides USAGE on that warehouse.
The warehouse provides compute for work such as queries and DML, including bulk loads. The referenced objects still require the appropriate privileges, such as USAGE on the database and schema and SELECT on the table for a read. If the warehouse is suspended, automatic resumption depends on its settings. If automatic resumption is disabled, an authorized role must resume it.
Recheck the selected warehouse and rerun a permitted test against the intended object. For a read test of warehouse access, use a permitted warehouse-dependent statement with persisted result reuse disabled for that session.
Virtual warehouses · Snowflake access control privileges · USE WAREHOUSE
Full explanation
Virtual Warehouses: Sizing, Scaling, Concurrency, and Cost
Study guide · COF-C03
Read the full explanation