ALTER WAREHOUSE reporting_wh SET WAREHOUSE_SIZE = 'X4LARGE'; takes effect at once, and each size step doubles the credits the warehouse consumes per hour while it runs. More clusters, a different warehouse type or AUTO_SUSPEND = 0 (never suspend) have the same effect: no data is touched, but cost grows until someone changes it back. Put the warehouse back to its previous settings and check the credits already used.
How to recover the data
- Restore the previous settings, for example
ALTER WAREHOUSE reporting_wh SET WAREHOUSE_SIZE = 'XSMALL' AUTO_SUSPEND = 60;(use the size and suspend time it had before). - If it is running and nothing needs it, suspend it:
ALTER WAREHOUSE reporting_wh SUSPEND; - See what it cost in
SNOWFLAKE.ACCOUNT_USAGE.WAREHOUSE_METERING_HISTORY, and restore any resource monitor quota or action that was changed.
Why it happens
A slow query is "fixed" by making the warehouse bigger, a test leaves it at that size, or a script sets AUTO_SUSPEND to keep it warm. Any role with MODIFY on a warehouse can change its size, and an agent asked to make a query faster may do the same.
How to fix it
Manage warehouse size, cluster counts and suspension in infrastructure-as-code, and grant USAGE, not MODIFY, to the roles that run queries. Put a resource monitor on each warehouse with a credit quota and a SUSPEND action:
CREATE RESOURCE MONITOR reporting_rm WITH CREDIT_QUOTA = 100
TRIGGERS ON 90 PERCENT DO NOTIFY ON 100 PERCENT DO SUSPEND;
ALTER WAREHOUSE reporting_wh SET RESOURCE_MONITOR = reporting_rm;Choose the quota from your own budget; the numbers above are only an example.
How to stop it from happening again
VERICTO-095 · Warehouse cost (Snowflake) · Severity: High · AST node: Classified > ALTER WAREHOUSE (size, clusters or suspension)
The statement the rule reports
-- warehouse.sql
ALTER WAREHOUSE reporting_wh SET WAREHOUSE_SIZE = 'X4LARGE';
Real CLI output
$ npx @vericto/vericto-cli@2.3.0 check --offline --dialect snowflake warehouse.sql
note: offline mode: 42 standard rules at default severities, engine 5.1.0. Custom rules, overrides, sensitive columns, allowlists and the audit trail apply online only.
✖ warehouse.sql BLOCKED VERICTO-095 high
Classified > ALTER WAREHOUSE (size, clusters or suspension)
fix: Size warehouses and resource monitors through infrastructure-as-code
1 blocked · 0 allowed · 0 flagged · 0 monitored (ruleset standard@engine-5.1.0 · mode: offline (engine 5.1.0, 42 standard rules, no workspace policy))
✖ Vericto blocked 1 statement (ruleset standard@engine-5.1.0 · mode: offline (engine 5.1.0, 42 standard rules, no workspace policy))
✖ warehouse.sql BLOCKED VERICTO-095 high
Classified > ALTER WAREHOUSE (size, clusters or suspension)
fix: Size warehouses and resource monitors through infrastructure-as-code
This is Vericto enforcing a rule — the exit code is intentional, not a crash.
To allow a finding on purpose, add an inline comment on the statement:
-- vericto:ignore[VERICTO-095] <reason> (a reason is required)
The CLI blocks it and exits with code 1, so the CI job fails before the merge.
Try it free, no account
The CLI checks your .sql files on your machine with the 42 standard rules: no sign-up, no API key, and no SQL leaves your computer. It is open source (AGPL-3.0-only).
npx @vericto/vericto-cli@2.3.0 check --offline --dialect snowflake migrations/
On every pull request
The vericto/check-sql GitHub Action (Apache-2.0) runs the same offline check on the .sql files a PR changes and annotates the findings on the PR. Save it as .github/workflows/vericto.yml:
on: pull_request
jobs:
vericto:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with: { fetch-depth: 0 }
- uses: vericto/check-sql@v1
with: { offline: true, upload-sarif: false, dialect: snowflake }
At runtime, for AI agents
The SQL an AI agent writes never goes through a PR. The Vericto TCP proxy checks each statement between the application or agent and the database, and the MCP check_sql tool lets the agent check SQL before it runs it. Both use the runtime profile, which also blocks schema changes.
The AST condition in the engine
The rule is evaluated by the dialect's classifier; its full definition is in the open source engine's README (AGPL-3.0-only), at this page's commit.
Frequently asked questions
Related rules
- VERICTO-096: Code that runs later (Snowflake)
- VERICTO-097: Role switch (Snowflake)
- VERICTO-050: SELECT without LIMIT