SQL Queries To Create Resource Monitors
SQL Queries To Create Resource Monitors
/*
To create a monitor that is similar to the first example, but suspends at 90%
and suspends immediately at 100% to prevent all warehouses in the account from
consuming credits after the quota has been reached:
*/
/*
To create a monitor that is similar to the first example, but lets the assigned
warehouse exceed the quota by 10%
and also includes two notification actions to alert account administrators as the
used credits reach the halfway and three-quarters points for the quota:
*/
use role accountadmin;
/*
To create an account-level resource monitor that starts immediately (based on the
current timestamp), resets monthly on the same day
and time, has no end date or time, and suspends the assigned warehouse when the
used credits reach 100% of the quota:
*/
/*
To create a resource monitor that starts at a specific date and time in the future,
resets weekly on the same day and time,
has no end date or time, and performs two different suspend actions at different
thresholds on two assigned warehouses:
*/