AUTOMAINT_GET_POLICYFILE procedure - retrieve automatic maintenance policy
The AUTOMAINT_GET_POLICYFILE system stored procedure retrieves the automatic maintenance configuration for the database.
This procedure takes two parameters: the type of automatic maintenance about which to collect information; and the name of a file in which to return the configuration information. The configuration information is returned in XML format.
Authorization
One
of the following authorities is required to execute the routine:
- EXECUTE privilege on the routine
- DATAACCESS authority
- DBADM authority
- SQLADM authority
Default PUBLIC privilege
None
Syntax
The schema is SYSPROC.
Procedure parameters
-
policy_type
- An input argument of type VARCHAR(128) that specifies the type
of automatic maintenance policy to retrieve. The argument can be
one of the following values:
-
AUTO_AIOPT
- automatic AI Query Optimizer model operations AUTO_BACKUP
- automatic backup
-
AUTO_REORG
- automatic table and index reorganization
-
AUTO_RUNSTATS
- automatic table runstats operations
-
MAINTENANCE_WINDOW
- maintenance window
policy_file_name
- An input argument of type VARCHAR(2048) that specifies the name of the file that is created in the tmp subdirectory of the database instance directory.
Example
To get the current automatic maintenance settings for backup operations:
call sysproc.automaint_get_policyfile( 'AUTO_BACKUP', 'AutoBackup.xml' )
This will create an XML file named AutoBackup.xml in the tmp subdirectory under the database instance directory.