Scenario: ExampleBANK reclaiming table and index space - AUTO_REORG policy

Olivia can opt to automatically manage index reorganization in place of performing manual checks.

In the samples directory SQLLIB/samples/automaintcfg, Olivia finds a file called DB2AutoReorgPolicySample.xml. In this file, Olivia notes the following line:

<ReorgOptions dictionaryOption="Keep" indexReorgMode="Offline" 
	useSystemTempTableSpace="false" />

Olivia decides that the reclaimExtentsSizeForIndexObjects threshold must exceed 51,200 KB (50 MB) before any automatic reorganization with the RECLAIM EXTENTS option is run. Olivia copies DB2AutoReorgPolicySample.xml to a file called autoreorg_policy.xml and changes the line in the sample to the following value:

<ReorgOptions dictionaryOption="Keep" indexReorgMode="Online" 
	useSystemTempTableSpace="false" reclaimExtentsSizeForIndexObjects="51200"  />

Olivia then sets the policy:

cp $HOME/autoreorg_policy.xml $HOME/sqllib/tmp/.
db2 "call sysproc.automaint_set_policyfile( 'AUTO_REORG', 'autoreorg_policy.xml')"

As a final step, Olivia ensures that AUTO REORG is enabled. For more details, see the related tasks.

Now that the policy is defined and AUTO REORG is enabled, automatic reorganization starts when the reclaimExtentsSizeForIndexObjects threshold exceeds 51,200 KB (50 MB).