IBM Support

50 DB2 Nuggets #7 : Tech Tip - How to delete/ remove policy file

Technical Blog Post


50 DB2 Nuggets #7 : Tech Tip - How to delete/ remove policy file


Hi all!

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? :)

Answer is

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!



[{"Business Unit":{"code":"BU029","label":"Data and AI"}, "Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]