SHOW MAINTENANCE POLICIES

Lists the maintenance policies applied to the specified account or app.

See also:

CREATE MAINTENANCE POLICY, ALTER MAINTENANCE POLICY, DROP MAINTENANCE POLICY

Syntax

SHOW MAINTENANCE POLICIES { ON | IN } { ACCOUNT | APPLICATION <app_name> | <entity_type> <entity_name> }
Copy
ACCOUNT

Shows 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:

ACCOUNT

Returns records for the entire account.

APPLICATION app_name

Returns records for the specified app.

IN entity_type entity_name

Returns records for the specified entity. Specify one of the following for the entity_type:

  • DATABASE

  • APPLICATION PACKAGE

  • SCHEMA

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;
Copy

Show maintenance policies for a specific app:

SHOW MAINTENANCE POLICIES ON APPLICATION my_app;
Copy

Show maintenance policies for a specific database:

SHOW MAINTENANCE POLICIES IN DATABASE my_database;
Copy

Show maintenance policies for a specific app package:

SHOW MAINTENANCE POLICIES IN APPLICATION PACKAGE my_app_package;
Copy

Show maintenance policies for a specific schema:

SHOW MAINTENANCE POLICIES IN SCHEMA my_schema;
Copy