Cleaning up USM Maintenance Schedules

Document ID : KB000106216
Last Modified Date : 20/12/2018
Show Technical Document Details
Introduction:
The maintenance_mode probe does not archive expired maintenance schedules.
As a result, this may impact the user response times in UMP. 
Environment:
UIM 9.X and earlier
Instructions:
Attached is an MS SQL script containing 3 queries that can be used to help.
  1.    "Cleanup of empty schedules"
  2.    "Cleanup of maintenance schedules older than 60 days"
  3.    "Cleanup of old maintenance WINDOWS"

Anyone of these 3 queries can be run as seen fit. 
It is advisable to backup the tables before running the script.
You may also change the "DELETE" to a "SELECT" before running.

Note: Be careful when cleaning up Schedules and Windows. In addition to the nas probe suppressing alarms the windows are
    also used by SLA Reports, and USM graphs (graphs will display maintenance windows, shaded grey area). If reducing the
    number of days to keep please check to see if these are needed for SLA's or graphs.

Note: for older installs it may be necessary to change the database name in the scripts from CA_UIM to NimsoftSLM.



    
Additional Information:
  • No probes need to be stopped in order to do this clean up.
  • You can check what is happening in the following ways:
    • If you want to know if records are removed you could do a simple
      • select count(*) from tablename for each table before and after.
      • You could run the delete query multiple times the first time it should show you X number of rows deleted the second time 0 rows.
File Attachments:
Cleanup_maintenance_schedules.sql