UIM MCS SSRV2AuditTrail table is over 24gb in size.

Document ID : KB000106271
Last Modified Date : 13/07/2018
Show Technical Document Details
Question:
The UIM MCS SSRV2AuditTrail table is over 24gb in size. How can it be reduced in size. 
Answer:
The SSRV2AuditTrail history can be safely removed. 

This script will empty SSRV2AuditTrail and SSRV2AuditTrailModification.

USE <your database name>;
TRUNCATE TABLE SSRV2AuditTrailModification;
ALTER TABLE SSRV2AuditTrailModification DROP CONSTRAINT FK_SSRV2AuditTrailModification_SSRV2AuditTrail;
TRUNCATE TABLE SSRV2AuditTrail;
ALTER TABLE SSRV2AuditTrailModification WITH NOCHECK ADD  CONSTRAINT FK_SSRV2AuditTrailModification_SSRV2AuditTrail FOREIGN KEY(auditrecord)
REFERENCES SSRV2AuditTrail(id);
ALTER TABLE SSRV2AuditTrailModification NOCHECK CONSTRAINT FK_SSRV2AuditTrailModification_SSRV2AuditTrail;
 
Additional Information:
In mon_config_service-8.5.8-HF4 has added garbage collection of the MCS SSRV2Audittrail and SSRV2AudittrailModification tables.

It is available from here:
https://support.ca.com/us/product-content/recommended-reading/technical-document-index/ca-unified-infrastructure-management-hotfix-index.html

Follow the deployment instructions details in the readme.