Hi All

 

Little help if anyone has done this. I'm trying to create a Patch Compliance Report for a label. Not real good with SQL, any help would be great.

 

Thanks

0 Comments   [ + ] Show Comments

Comments

  • This content is currently hidden from public view.
    Reason: Removed by member request
    For more information, visit our FAQ's.
Please log in to comment

Answers

0

Here is a report that will list patches that have not been patched from a specific label. Just change 'Patch - SOX Windows OS' to your patch label and 'Windows Workstations (All)' to your machine label.

Select MACHINE.NAME as MACHINE_NAME, MACHINE.USER, MACHINE.USER_FULLNAME, SUM(S.STATUS='NOTPATCHED') AS NOT_PATCHED, GROUP_CONCAT(P.TITLE) AS PATCH_NAME
FROM  PATCHLINK_MACHINE_STATUS S,
        MACHINE,
        KBSYS.PATCHLINK_PATCH P,
        PATCHLINK_PATCH_LABEL_JT PL,
        LABEL PATCH_LABEL,
        LABEL MACHINE_LABEL,
        MACHINE_LABEL_JT ML,
        PATCHLINK_PATCH_STATUS PS
WHERE  MACHINE.ID = S.MACHINE_ID
        AND S.PATCHUID = P.UID
        AND PL.PATCHUID = P.UID
        AND PATCH_LABEL.ID = PL.LABEL_ID
        AND ML.MACHINE_ID = MACHINE.ID
        AND MACHINE_LABEL.ID = ML.LABEL_ID
        AND PS.PATCHUID= P.UID
        AND PS.STATUS = '0'
        AND S.STATUS = 'NOTPATCHED'
        AND PATCH_LABEL.NAME IN('Patch - SOX Windows OS')
        AND MACHINE_LABEL.NAME IN ('Windows Workstations (All)')
group by MACHINE_NAME
order by MACHINE_NAME, P.TITLE

Answered 06/03/2013 by: jparkins
Blue Belt

  • Thanks J will give it a try
Please log in to comment
Answer this question or Comment on this question for clarity

Share