A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.snowflake.com/en/sql-reference/sql/alter-resource-monitor below:

Website Navigation


ALTER RESOURCE MONITOR | Snowflake Documentation

ALTER RESOURCE MONITOR

Modifies the properties and triggers for an existing resource monitor. Use this command to increase or decrease the credit quota, change the scheduling information, or change/replace the triggers for a resource monitor.

See also:

CREATE RESOURCE MONITOR , DROP RESOURCE MONITOR , SHOW RESOURCE MONITORS , ALTER WAREHOUSE , ALTER ACCOUNT

Syntax
ALTER RESOURCE MONITOR [ IF EXISTS ] <name> [ SET { [ CREDIT_QUOTA = <num> ]
                                                    [ FREQUENCY = { MONTHLY | DAILY | WEEKLY | YEARLY | NEVER } ]
                                                    [ START_TIMESTAMP = { <timestamp> | IMMEDIATELY } ]
                                                    [ END_TIMESTAMP = <timestamp> ]
                                                    [ NOTIFY_USERS = ( <user_name> [ , <user_name> , ... ] ) ] } ]
                                            [ TRIGGERS triggerDefinition [ triggerDefinition ... ] ]

Copy

Where:

triggerDefinition ::=
   ON <threshold> PERCENT DO { SUSPEND | SUSPEND_IMMEDIATE | NOTIFY }

Copy

Parameters
name

Specifies the identifier for the resource monitor to alter. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.

SET ...
CREDIT_QUOTA = num

Specifies the number of credits allocated to the resource monitor per frequency interval. When total usage for all warehouses assigned to the monitor reaches this number for the current frequency interval, the resource monitor is considered to be at 100% of quota.

If a value is not specified for a resource monitor, the monitor has no quota and will never reach 100% usage within the specified interval.

FREQUENCY = MONTHLY | DAILY | WEEKLY | YEARLY | NEVER

The frequency interval at which the credit usage resets to 0.

If you specify NEVER for the frequency, the credit usage for the warehouse does not reset.

START_TIMESTAMP = timestamp | IMMEDIATELY

The date and time when the resource monitor starts monitoring credit usage for the assigned warehouses.

If you specify IMMEDIATELY for the start timestamp, the current timestamp is used.

If you specify a date without a time, the current time is used.

If you set a time without specifying a time zone, UTC is used as the default time zone.

END_TIMESTAMP = timestamp

The date and time when the resource monitor suspends the assigned warehouses.

NOTIFY_USERS = ( user_name [ , user_name , ... ] )

Specifies the list of users to receive email notifications on resource monitors. If a user identifier includes spaces or special characters or is case-sensitive, then the identifier must be enclosed in double quotes (e.g. “Mary Smith”). See Identifier requirements for details.

The user identifier, user_name, is the value of the name column from the output of SHOW USERS.

Each user listed must have a verified email address. For instructions on verifying email addresses in the web interface, see:

Email notifications for non-administrator users do not supersede email notifications for administrators. Any account administrators that have enabled email notifications will continue to receive email notifications.

Note

  • The following limitations apply for non-administrator users:

    • Non-administrator users can only receive notifications for warehouse monitors.

    • Non-administrator users are notified by email but can’t see notifications in the Classic Console.

    • Non-administrator users can’t create resource monitors.

    • Non-administrator users can’t assign other users to be notified.

TRIGGERS ... (aka actions)

Specifies one or more triggers for the resource monitor. Each trigger definition consists of:

For more details, see CREATE RESOURCE MONITOR.

Usage notes Examples

Specify a new credit quota for the resource monitor limiter and replace the existing triggers for the monitor with a new set of triggers:

ALTER RESOURCE MONITOR limiter
  SET CREDIT_QUOTA=2000
  TRIGGERS ON 80 PERCENT DO NOTIFY
           ON 100 PERCENT DO SUSPEND_IMMEDIATE;

Copy

Alter a resource monitor to send notifications to three users when 80% of the credit quota is reached. In this example, the user_name for two of the users includes a space and is therefore enclosed in double quotes:

ALTER RESOURCE MONITOR limiter
  SET CREDIT_QUOTA = 2000
      NOTIFY_USERS = (JDOE, "Jane Smith", "John Doe")
  TRIGGERS ON 80 PERCENT DO NOTIFY
           ON 100 PERCENT DO SUSPEND_IMMEDIATE

Copy


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4