Bird
Raised Fist0
SnowflakeHow-ToBeginner · 3 min read

How to Suspend Warehouse in Snowflake: Syntax and Examples

To suspend a warehouse in Snowflake, use the SUSPEND WAREHOUSE <warehouse_name> command. This stops the warehouse from running and saves costs until you resume it.
📐

Syntax

The command to suspend a warehouse in Snowflake is simple. You write SUSPEND WAREHOUSE <warehouse_name>, where <warehouse_name> is the name of your warehouse. This command pauses the warehouse, stopping all compute charges until you resume it.

sql
SUSPEND WAREHOUSE my_warehouse;
💻

Example

This example shows how to suspend a warehouse named my_warehouse. After running this command, the warehouse stops running and you won't be charged for compute until you resume it.

sql
SUSPEND WAREHOUSE my_warehouse;
Output
Statement executed successfully.
⚠️

Common Pitfalls

One common mistake is trying to suspend a warehouse that is already suspended, which does nothing but does not cause an error. Another is misspelling the warehouse name or using the wrong case, as Snowflake is case-sensitive if names are quoted. Also, remember you need the proper privileges to suspend a warehouse.

sql
/* Wrong: misspelled warehouse name */
SUSPEND WAREHOUSE my_warehous;

/* Right: correct warehouse name */
SUSPEND WAREHOUSE my_warehouse;
📊

Quick Reference

CommandDescription
SUSPEND WAREHOUSE ;Pauses the warehouse to stop compute charges.
RESUME WAREHOUSE ;Restarts the warehouse to resume compute.
SHOW WAREHOUSES;Lists all warehouses and their current states.
✅

Key Takeaways

Use the command SUSPEND WAREHOUSE to pause a warehouse.
Suspending a warehouse stops compute charges until it is resumed.
Ensure the warehouse name is correct and you have the right privileges.
Suspending an already suspended warehouse has no effect but causes no error.
Use SHOW WAREHOUSES to check the status of your warehouses.