SHOW MAINTENANCE POLICIES¶
Lists the maintenance policies applied to the specified account or app.
Syntax¶
SHOW MAINTENANCE POLICIES { ON | IN } { ACCOUNT | APPLICATION <app_name> | <entity_type> <entity_name> }
ACCOUNTShows the maintenance policies applied to the account.
APPLICATION <app_name>Shows the maintenance policies applied to the specified app.
Parameters¶
{ ON | IN }Specifies the scope of the command. Specify one of the following:
ACCOUNTReturns records for the entire account.
APPLICATION app_nameReturns records for the specified app.
IN entity_type entity_nameReturns records for the specified entity. Specify one of the following for the
entity_type:DATABASEAPPLICATION PACKAGESCHEMA
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 |
|---|---|---|
APPLY MAINTENANCE POLICY |
Account |
|
OWNERSHIP |
Maintenance policy |
OWNERSHIP is a special privilege on an object that is automatically granted to the role that created the object, but can also be transferred using the GRANT OWNERSHIP command to a different role by the owning role (or any role with the MANAGE GRANTS privilege). |
Examples¶
The following example shows all maintenance policies applied to the account:
SHOW MAINTENANCE POLICIES ON ACCOUNT;
Show maintenance policies for a specific app:
SHOW MAINTENANCE POLICIES ON APPLICATION my_app;
Show maintenance policies for a specific database:
SHOW MAINTENANCE POLICIES IN DATABASE my_database;
Show maintenance policies for a specific app package:
SHOW MAINTENANCE POLICIES IN APPLICATION PACKAGE my_app_package;
Show maintenance policies for a specific schema:
SHOW MAINTENANCE POLICIES IN SCHEMA my_schema;