Skip to main content

Automate Database Maintenance - Patch Manager

Summary

This script is called from CWM - Automate - Script - Automate Database Maintenance Solution.

This script handles the cleanup of the following table(s) and requires the CWM - Automate - Script - Automate Database Maintenance Solution PatchManagerHistory_Cleanup global variable to be set to 1:

  • patchapprovalsettings
  • hotfixdata
  • PatchCVSSInfo
  • hotfix
  • superseded patches

Sample Run

This script is a function script called from CWM - Automate - Script - Automate Database Maintenance Solution.

Variables

Document the various variables in the script. Delete any section that is not relevant to your script.

NameDescription
VerifyThis variable verifies both the starting count of targeted data, as well as the after-action count of targeted data. We expect the starting count to be a value greater than 0, and the after-action value to be 0.
LogMessageThis variable is the running log holding variable. Please note this variable is always set the same everywhere it's used in the solution. @logMessage@ = @LogMessage@[Linebreak]%when% : [Category] Cleanup [Stage] - Result. Please continue to utilize this standard with this running log file.

Output

This script will add the following section to the log variable:

Output Image