USM Maintenance Schedule - create group

Document ID : KB000097591
Last Modified Date : 23/05/2018
Show Technical Document Details
Introduction:
How to setup a Dynamic Group in USM that will show devices for a specific schedule based on the schedule's name
Environment:
UIM 8.51
 
Instructions:
Identify the name of the Maintenance Schedule.  In this example, "Monthly Maintenance".
Create a new Dynamic Group in USM, selecting "SQL".
Edit the "SQL" to have something like the following example:
 
select * from CM_COMPUTER_SYSTEM where cs_id in
       (select cs_id from MAINTENANCE_SCHEDULE_MEMBERS where schedule_id in
              (select schedule_id from MAINTENANCE_WINDOW
              where START_TIME <= CURRENT_TIMESTAMP AND END_TIME >= CURRENT_TIMESTAMP));
 
Save the Group and it will be populated with all devices with that Maintenance Schedule.
Additional Information:
Here is another sample query for device in maintenance (MS SQL):

select * from CM_COMPUTER_SYSTEM where cs_id in (select cs_id from MAINTENANCE_SCHEDULE_MEMBERS where schedule_id in (select schedule_id from MAINTENANCE_WINDOW where START_TIME <= CURRENT_TIMESTAMP AND END_TIME >= CURRENT_TIMESTAMP));