Overview
The attached SQL Script is intended to help optimize the EPM database and improve performance of processes that rely heavily on it, like Inventory. Below details what specific portions of this script does.
This script IS NOT officially supported by Ivanti. Ivanti is not responsible for any damages, direct or incidental, caused by running this script. RUN AT YOUR OWN RISK!
ALWAYS take a FULL backup of your database before making any modifications to the database, including, but not limited to, running this SQL Script.
What it does
- Clears Patch History
- Clears Auditing History
- Clears EPS Logging History
- Cleans unnecessary files from file information tables
- Rebuilds indexes
- Runs CHECKDB
- Creates a SQL checkpoint
Options
The below lines in the SQL script should be edited to better match your company's needs.
SET @DaysToKeepPatchHistory = 90 --Change 90 to how many days of patching history you want
SET @DaysToKeepAuditing = 90 --Change 90 to how many days of auditing history you want
SET @DaysToKeepSecurityAction = 90 --Change 90 to how many days of security actions from EPS you want
The value of 90 means the script will retain 90 days of the affected data (Patch history, auditing, EPS history). This should be changed to reflect your company's data retention and reporting needs/policies.