CREATE MAINTENANCE POLICY¶
Creates a new maintenance policy in the current or specified schema.
Syntax¶
Required parameters¶
nameSpecifies the identifier of the maintenance policy. The identifier must be unique within the schema.
SCHEDULE = 'USING CRON cron_spec timezoneSpecifies the schedule for the maintenance policy. This parameter uses the same syntax as the
SCHEDULEparameter of the CREATE TASK command.
Optional parameters¶
COMMENT = 'comment'Specifies an optional comment for the maintenance policy.
Usage notes¶
Each app or account can have only one maintenance policy.
Access control requirements¶
A role used to execute this SQL command must have at least one of the following privileges at a minimum:
Privilege |
Object |
Notes |
|---|---|---|
CREATE MAINTENANCE POLICY |
Schema |
Examples¶
The following example creates a maintenance policy that schedules upgrades for Saturdays at 2 AM UTC: