/build/static/layout/Breadcrumb_cap_w.png

Need Patch SQL script to show the device patching status and percent report

Need  Patch SQL script to show the device patching status and percent report.

requirement.

1、Report the patch installation according to label (win7, win10, win2016, win2019, etc.), such as success rate.

2、Which machines succeeded and which failed, percent rate.


Thanks



0 Comments   [ + ] Show comments

Answers (2)

Answer Summary:
Posted by: Nykko 2 years ago
Senior White Belt
2

I write a SQL report and it works by SMART LABEL 


SELECT

M.NAME AS MACHINE_NAME,

OS_NAME AS WINDOWS_VERSION,

M.LAST_SYNC as Last_Inventory,

M.LAST_REBOOT as Last_Reboot,

SUM(MS.DETECT_STATUS = 'PATCHED') AS PATCHED,

SUM(MS.DETECT_STATUS = 'NOTPATCHED') AS NOTPATCHED,

FLOOR(ROUND((SUM(MS.DETECT_STATUS = 'PATCHED') / (SUM(MS.DETECT_STATUS =

'PATCHED') + SUM(MS.DETECT_STATUS = 'NOTPATCHED'))) * 100,1)) AS

PERCENT_PATCHED

FROM

PATCH_MACHINE_STATUS MS

JOIN KBSYS.PATCH PP ON (PP.ID = MS.PATCH_ID)

JOIN PATCH_STATUS PPS ON (PPS.PATCH_ID = PP.ID)

JOIN MACHINE M ON (M.ID = MS.MACHINE_ID)

JOIN KBSYS.SMMP_CONNECTION SC ON (M.KUID = SC.KUID)

JOIN MACHINE_LABEL_JT ML ON (M.ID = ML.MACHINE_ID)

JOIN LABEL L ON (ML.LABEL_ID = L.ID)

WHERE

PPS.STATUS = 0

AND PPS.IS_SUPERCEDED = 0

AND L.NAME = 'Windows 10'

GROUP BY MS.MACHINE_ID

ORDER BY PERCENT_PATCHED , M.NAME


N3FhHWnFzuQAAAABJRU5ErkJggg==


Posted by: KevinG 2 years ago
Red Belt
1

The information is available in the PATCH_MACHINE_STATUS table.

If you are not familiar with writing a SQL report, you can contact the Professional Services group at GettingStarted@quest.com.

They can provide you with a quote on the fee.


Comments:
  • Thanks Kevin - Nykko 2 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ