# Warehouse access

To onboard to the scheduler feature, ensure users have access to all the warehouses we route to.

Granting warehouse access does not grant any data access. It only permits users to operate the warehouses they already have data access to use.

## Fast grant for all warehouses

For fast onboarding, run the following query to grant `OPERATE` on every warehouse to the `PUBLIC` role:

```sql
EXECUTE IMMEDIATE $$
DECLARE
  rs RESULTSET;
BEGIN
  SHOW WAREHOUSES;
  rs := (
    SELECT "name" AS WAREHOUSE_NAME
    FROM TABLE(RESULT_SCAN(LAST_QUERY_ID(-1)))
  );

  FOR r IN rs DO
    EXECUTE IMMEDIATE
      'GRANT USAGE ON WAREHOUSE "' || r.WAREHOUSE_NAME || '" TO ROLE PUBLIC';
  END FOR;
END;
$$;
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.espresso.ai/snowflake-optimizer/proxy-onboarding/proxy-onboarding-warehouse-access.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
