QuestionQ16

Manage and maintain database objects and virtual warehouses

An Administrator has a warehouse that is intended to have a credit quota of 3000 for every calendar year. The Administrator must create a resource monitor that performs these tasks:

  1. At 80% usage, notify the account Administrators.
  2. At 100% usage, suspend the warehouse and notify the account Administrators.
  3. At 120% usage, stop all running executions, suspend the warehouse, and notify the account Administrators.

Which SQL command meets these requirements?

Explanation

A yearly resource-monitor interval requires FREQUENCY = YEARLY with the start timestamp. NOTIFY notifies account administrators, SUSPEND suspends assigned warehouses while allowing running statements to finish and notifies users, and SUSPEND_IMMEDIATE immediately suspends warehouses, cancels running statements, and notifies users. Thus the required triggers are NOTIFY at 80%, SUSPEND at 100%, and SUSPEND_IMMEDIATE at 120%.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!