The AUTOMAINT_GET_POLICY 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 a pointer to a BLOB in which to return
the configuration information. The configuration information is returned
in XML format.
Syntax
>>-AUTOMAINT_GET_POLICY--(--policy_type--,--policy--)----------><
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_BACKUP
- automatic backup
- AUTO_REORG
- automatic table and index reorganization
- AUTO_RUNSTATS
- automatic table runstats operations
- MAINTENANCE_WINDOW
- maintenance window
- policy
- An output argument of type BLOB(2M) that specifies the automatic
maintenance settings for the given policy type, in XML format.
Authorization
EXECUTE privilege on the
AUTOMAINT_GET_POLICY procedure.
Example
Here is an example of a call to
the AUTOMAINT_GET_POLICY procedure from within embedded SQL C source
code.
- A BLOB variable is declared for the procedure output parameter.
- The procedure is called, specifying automated backup as the type
of automatic maintenance policy, and specifying the BLOB variable
as the output parameter in which the procedure will return the backup
policy for the currently connected database.
EXEC SQL BEGIN DECLARE SECTION;
SQL TYPE IS BLOB(2M) backupPolicy;
EXEC SQL END DECLARE SECTION;
EXEC SQL CALL AUTOMAINT_GET_POLICY( 'AUTO_BACKUP', :backupPolicy );