You can use the system stored procedures AUTOMAINT_SET_POLICY
and AUTOMAINT_SET_POLICYFILE to configure the automated maintenance
policy for a database.
Procedure
To configure the automated maintenance policy for a
database, perform the following steps:
- Connect to the database
- Call AUTOMAINT_SET_POLICY or AUTOMAINT_SET_POLICYFILE
- The parameters required for AUTOMAINT_SET_POLICY are:
- Maintenance type, specifying the type of automated maintenance
activity to configure.
- Pointer to a BLOB that specifies the automated maintenance policy
in XML format.
- The parameters required for AUTOMAINT_SET_POLICYFILE are:
- Maintenance type, specifying the type of automated maintenance
activity to configure.
- The name of an XML file that specifies the automated maintenance
policy.
Valid maintenance type values are:
- AUTO_BACKUP - automatic backup
- AUTO_REORG - automatic table and index reorganization
- AUTO_RUNSTATS - automatic table RUNSTATS operations
- MAINTENANCE_WINDOW - maintenance window
What to do next
You can use the system stored procedures AUTOMAINT_GET_POLICY
and AUTOMAINT_GET_POLICYFILE to retrieve the automated maintenance
policy configured for a database.