DB2 10.5 for Linux, UNIX, and Windows

Sample automated maintenance policy specification XML for AUTOMAINT_SET_POLICY or AUTOMAINT_SET_POLICYFILE

Whether you are using AUTOMAINT_SET_POLICY or AUTOMAINT_SET_POLICYFILE to specify your automated maintenance policy, you must specify the policy using XML. There are sample files that demonstrate how to specify your automated maintenance policy in XML. In Linux and UNIX operating systems, you can find the sample files in the SQLLIB/samples/automaintcfg directory. In Windows operating systems, you can find the sample files in the SQLLIB\samples\automaintcfg directory.

The second parameter you pass to the system stored procedure AUTOMAINT_SET_POLICY is a BLOB containing XML, specifying your desired automated maintenance policy. The second parameter you pass to the system stored procedure AUTOMAINT_SET_POLICYFILE is the name of an XML file that specifies your desired automated maintenance policy. The XML elements that are valid in the BLOB you pass to AUTOMAINT_SET_POLICY are the same elements that are valid in the XML file you pass to AUTOMAINT_SET_POLICYFILE.

In the samples directory (SQLLIB/samples/automaintcfg in Linux and UNIX environments and SQLLIB\samples\automaintcfg in Windows environments) there are four XML files that contain example automated maintenance policy specification:

DB2MaintenanceWindowPolicySample.xml

Demonstrates specifying a maintenance window during which time the database manager should schedule automated maintenance.

DB2AutoBackupPolicySample.xml

Demonstrates specifying how the database manager should perform automatic backup.

DB2AutoReorgPolicySample.xml

Demonstrates specifying how the database manager should perform automatic table and index reorganization.

DB2DefaultAutoRunstatsPolicySample.xml

Demonstrates specifying how the database manager should perform automatic table runstats operations.

You can create your own automated maintenance policy specification XML by copying the XML from these files and modifying that XML according to the requirements of your system.