Machines that failed to patch in last 30 days
Include Patch ID, Vendor Name, Patch installation date, Deploy status, IP address, Last logon user of each failed patch,
and group by machine.
0 Comments
[ + ] Show comments
Answers (1)
Answer Summary:
SELECT PP.VENDOR AS VENDOR, PP.IDENTIFIER, MS.DEPLOY_STATUS_DT AS DEPLOYED_DATE, MS.DEPLOY_STATUS, M.NAME AS ComputerName,IP, M.USER_LOGGED as USER_LOGGED FROM PATCHLINK_MACHINE_STATUS MS JOIN KBSYS.PATCHLINK_PATCH PP ON PP.UID = MS.PATCHUID JOIN MACHINE M ON M.ID = MS.MACHINE_ID WHERE MS.DEPLOY_STATUS NOT LIKE '%SUCCESS%' AND MS.DEPLOY_STATUS_DT > CURDATE() - INTERVAL 30 DAY ORDER BY M.NAME
SELECT PP.VENDOR AS VENDOR, PP.IDENTIFIER, MS.DEPLOY_STATUS_DT AS DEPLOYED_DATE, MS.DEPLOY_STATUS, M.NAME AS ComputerName,IP, M.USER_LOGGED as USER_LOGGED FROM PATCHLINK_MACHINE_STATUS MS JOIN KBSYS.PATCHLINK_PATCH PP ON PP.UID = MS.PATCHUID JOIN MACHINE M ON M.ID = MS.MACHINE_ID WHERE MS.DEPLOY_STATUS NOT LIKE '%SUCCESS%' AND MS.DEPLOY_STATUS_DT > CURDATE() - INTERVAL 30 DAY ORDER BY M.NAME
Please log in to answer
Posted by:
dugullett
12 years ago
SELECT PP.VENDOR AS VENDOR, PP.IDENTIFIER, MS.DEPLOY_STATUS_DT AS DEPLOYED_DATE, MS.DEPLOY_STATUS, M.NAME AS ComputerName,IP, M.USER_LOGGED as USER_LOGGED FROM PATCHLINK_MACHINE_STATUS MS JOIN KBSYS.PATCHLINK_PATCH PP ON PP.UID = MS.PATCHUID JOIN MACHINE M ON M.ID = MS.MACHINE_ID WHERE MS.DEPLOY_STATUS NOT LIKE '%SUCCESS%' AND MS.DEPLOY_STATUS_DT > CURDATE() - INTERVAL 30 DAY ORDER BY M.NAME