DB2 Version 9.7 for Linux, UNIX, and Windows

AUTOMAINT_GET_POLICY procedure - retrieve automatic maintenance policy

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

Read syntax diagramSkip visual syntax diagram
>>-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.

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