Reducing cm_cel_audit_record database table size from both voyence and archive schema.
search cancel

Reducing cm_cel_audit_record database table size from both voyence and archive schema.

book

Article ID: 345108

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

cm_cel_audit_record database table is consuming more size from both voyence and archive schema in NCM postgres, steps are shared to clear or reduce them during database maintenance activity.

Environment

NCM - 10.1.x

Resolution

The database maintenance operations require to be implemented in following order to reduce cm_cel_audit_record database table size:

1. perl database-utility.pl archive events all 30 (assuming users need to keep only 30 days of events) 
2. perl database-utility.pl purge events all 30
3. perl database-utility.pl prune events all 30 
4. Once execution of above commands have completed successfully, proceed to run the vacuum, reindex, and analyze operations (stop all services except controldb before executing
VACUUM FULL, REINDEX TABLE and ANALYZE operations): 
 

  • VACUUM FULL voyence.cm_cel_audit_record
  • REINDEX TABLE voyence.cm_cel_audit_record
  • ANALYZE voyence.cm_cel_audit_record;
  • VACUUM FULL archive.cm_cel_audit_record;
  • REINDEX TABLE archive.cm_cel_audit_record;
  • ANALYZE archive.cm_cel_audit_record;