CertSafari
    Snowflake SnowPro Specialty: Native Apps· Lessons

    Domain 4 · Lesson 11/12

    Consumer Maintenance Policies for Native App Upgrades

    Manage the consumer application lifecycle.

    7 min read
    9.67% of exam
    4 sources
    Published 5 Oct 2026
    Docs as of 4 Oct 2026

    What you will be able to do

    • Create, alter, and apply a maintenance policy at the account or app level with the required privileges
    • Describe the limits of a maintenance policy: start time only, and one policy per app or account
    • Predict when an upgrade runs, given the provider's UPGRADE_IN_MAINTENANCE_WINDOW and UPGRADE_DEADLINE settings

    1.What a maintenance policy controls

    Automatic upgrades usually begin as soon as the provider sets a new release directive. A consumer-controlled maintenance policy changes this. It lets the consumer keep upgrades out of specific time periods: if a policy is set, the upgrade is delayed until the start date and time the policy defines. Without a policy, the upgrade begins when the default upgrade time is reached.

    A policy schedule only says when upgrades may begin. You cannot set an end time or a duration. Each app or account can have only one maintenance policy. In practice, the schedule is a recurring start time, such as Saturdays at 02:00 UTC, when upgrades are allowed to begin.

    A policy controls the timing of an upgrade, not whether it happens. Snowflake automatically upgrades Native Apps when a provider releases a new version or patch. During an upgrade the app's code is replaced, while data inside the APPLICATION boundary is preserved. The maintenance policy only changes when that automatic upgrade is allowed to start.

    Checkpoint 1 of 4· Check yourself

    A consumer wants upgrades to happen only between 01:00 and 04:00 on Sundays. What can a maintenance policy express?

    Sources1

    2.Creating, applying, and changing a policy

    A maintenance policy is a schema-level object. You create it with CREATE MAINTENANCE POLICY. Its SCHEDULE uses the same 'USING CRON <cron_spec> <timezone>' syntax as the SCHEDULE parameter of CREATE TASK. The policy name must be unique within its schema, and COMMENT is an optional description.

    Create a policy that allows upgrades to begin Saturdays at 2 AM UTCsql
    CREATE MAINTENANCE POLICY my_maintenance_policy
      SCHEDULE = 'USING CRON 0 2 * * SAT UTC'
      COMMENT = 'Weekly Saturday maintenance policy';

    Creating a policy has no effect until you apply it. ALTER ACCOUNT applies it to every app in the account, and ALTER APPLICATION applies it to one app. The same two commands also remove a policy, so the scope of a policy is always set by which of the two commands you run.

    Apply the policy account-wide, or to a single appsql
    ALTER ACCOUNT SET MAINTENANCE POLICY my_maintenance_policy FOR ALL APPLICATIONS;
    
    ALTER APPLICATION my_app SET MAINTENANCE POLICY my_maintenance_policy;
    Privileges for consumer-controlled maintenance policies
    PrivilegeObjectNeeded to
    CREATE MAINTENANCE POLICYSchemaCreate a new maintenance policy
    APPLY MAINTENANCE POLICYAccountApply a policy to an account or app
    APPLY or OWNERSHIPMaintenance policyApply or view the policy; also required for ALTER MAINTENANCE POLICY

    To change the schedule later, use ALTER MAINTENANCE POLICY ... SET SCHEDULE. The same command can also SET or UNSET COMMENT, or RENAME TO a new name. SHOW MAINTENANCE POLICIES lists the policies for an account or app. DESCRIBE MAINTENANCE POLICY shows the details of one policy. DROP MAINTENANCE POLICY removes a policy from its schema.

    Move the window to Sundays at 3 AM UTCsql
    ALTER MAINTENANCE POLICY my_maintenance_policy SET
      SCHEDULE = 'USING CRON 0 3 * * SUN UTC';

    Checkpoint 2 of 4· Fill the gap

    Which parameter completes this policy definition?

    CREATE MAINTENANCE POLICY my_maintenance_policy
       ?  = 'USING CRON 0 2 * * SAT UTC'
      COMMENT = 'Weekly Saturday maintenance policy';

    Sources21

    3.Provider opt-in and the upgrade deadline

    The provider decides whether a consumer's policy applies to a given release. In the release directive, the provider sets UPGRADE_IN_MAINTENANCE_WINDOW = TRUE. When that parameter is TRUE, UPGRADE_DEADLINE is required. The deadline is the latest time the upgrade can wait, and after it passes the upgrade runs whatever the consumer's policy says. Because of the deadline, a consumer cannot postpone an upgrade indefinitely. The two timing controls cannot be combined: a release directive cannot set both UPGRADE_AFTER and UPGRADE_IN_MAINTENANCE_WINDOW.

    Provider side: a release directive that respects consumer maintenance windowssql
    ALTER APPLICATION PACKAGE my_app_package
      MODIFY RELEASE CHANNEL DEFAULT
      SET DEFAULT RELEASE DIRECTIVE
      VERSION = v1_0
      PATCH = 2
      UPGRADE_IN_MAINTENANCE_WINDOW = TRUE
      UPGRADE_DEADLINE = '2026-2-10T10:00:00Z';
    When the upgrade runs for a release with UPGRADE_IN_MAINTENANCE_WINDOW = TRUE
    Consumer situationUpgrade runs
    Maintenance policy setAt the next maintenance window or at UPGRADE_DEADLINE, whichever comes first
    No maintenance policyDuring the default system maintenance window
    App uses Snowpark Container Services and AUTOMATIC_APPLICATION_MAINTENANCE = TRUEApp code upgrades first, then compute pool node maintenance, in the same window

    For consumers, the practical advice is to schedule upgrades soon after a release arrives, at a time when someone is available to test and adjust. If the upgrade is left to run at the deadline, the app may become unavailable at a moment you did not plan for.

    For apps that use Snowpark Container Services, the provider can also set AUTOMATIC_APPLICATION_MAINTENANCE = TRUE on the application package. Without it, application upgrades and compute pool node maintenance are separate concerns that can happen at different times. With it, both are coordinated into the consumer's chosen window, and the application upgrades first.

    Checkpoint 3 of 4· Check yourself

    A consumer's policy allows upgrades only on the first Saturday of each quarter. The provider releases with UPGRADE_IN_MAINTENANCE_WINDOW = TRUE and an UPGRADE_DEADLINE two weeks away. The next window is six weeks away. When does the upgrade run?

    Checkpoint 4 of 4· Exam question

    Which SQL command does a consumer use to manually trigger an app upgrade before the provider's automatic upgrade process begins for that instance?

    Sources3

    Exam traps

    Each one states something that sounds right. Open it to see what is actually true.

    1. 1.Once a consumer applies a maintenance policy, every upgrade from every provider automatically waits for that window.Why is that wrong?

      A policy only applies when the provider releases with UPGRADE_IN_MAINTENANCE_WINDOW = TRUE. The provider has to opt in explicitly.

      Covered in Provider opt-in and the upgrade deadline

    2. 2.A sparse maintenance schedule lets a consumer delay an upgrade for as long as they want.Why is that wrong?

      The provider's UPGRADE_DEADLINE caps the delay. After the deadline, the upgrade proceeds no matter what the consumer's policy says.

      Covered in Provider opt-in and the upgrade deadline

    Sources

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “the upgrade is delayed until the start date and time specified in the maintenance policy.”
      ↩︎ What a maintenance policy controls
      “Each app or account can only have one maintenance policy set.”
      ↩︎ What a maintenance policy controls
      “Required to apply a maintenance policy to an account or app.”
      ↩︎ Creating, applying, and changing a policy
      “Only the start time for a maintenance policy can be specified; not the end time or the duration of the maintenance policy.”
      ↩︎ Checkpoint
    2. 2.
      “This parameter uses the same syntax as the SCHEDULE parameter of the CREATE TASK command.”
      ↩︎ Creating, applying, and changing a policy
    3. 3.
      “You can’t set the UPGRADE_AFTER and UPGRADE_IN_MAINTENANCE_WINDOW parameters at the same time.”
      ↩︎ Provider opt-in and the upgrade deadline
      “If the consumer has not set a maintenance policy, the upgrade happens during the default system maintenance window.”
      ↩︎ Provider opt-in and the upgrade deadline
      “After this deadline, the upgrade proceeds regardless of the consumer’s maintenance policy.”
      ↩︎ Exam trap 2
      “the upgrade is delayed until the next maintenance window defined by the consumer’s policy, or until the upgrade deadline is reached, whichever comes first.”
      ↩︎ Checkpoint

    Also cited

    Continue to page 3 of 3

    Uninstalling a Native App: DROP APPLICATION and CASCADE

    Spotted a mistake, or was something unclear? Tell us.