Recently I came across a PMR, customer was using sysproc.automaint_set_policyfile to perform reorg check. More details about sysproc.automaint_set_policyfile here. After performing reorg, customer wanted to remove the policy file. We can set automatic maintenance off using different ways i.e set db cfg parameter auto_maint off, or turn auto_reorg to off in db cfg. However this is not what customer wanted to do. Customer was interested in removing the policy file than just turning off automatic maintenance. Even with automatic maintenance off customer was able to see policy files using sysproc.automaint_get_policyfile. Question is how to remove policy file? :)
We cannot delete one policy unless delete all of them:
db2 "call sysinstallobjects('POLICY','D','','')"
and then install the default policy:
db2 "call sysinstallobjects('POLICY','C','','')"
More details on sysinstallobjects objects here.
Thank you for reading!