Patching Report
Hey everybody,
Basically I am trying to figure out how to narrow down the amount of information you get when you have a report tell you what was patched on the machine. Currently I am using this:
SELECT CONCAT(M.NAME, "\\", M.SYSTEM_DESCRIPTION) AS MACHINE_NAME,
P.IDENTIFIER AS KB_ARTICLE,
P.TITLE AS DISPLAY_NAME
FROM MACHINE_LABEL_JT MJ,
MACHINE M,
LABEL L,
PATCHLINK_MACHINE_STATUS S,
KBSYS.PATCHLINK_PATCH P
WHERE M.ID=MJ.MACHINE_ID
AND L.ID=MJ.LABEL_ID
AND M.ID = S.MACHINE_ID
AND S.PATCHUID = P.UID
AND S.STATUS = 'PATCHED'
AND (( 1 IN (SELECT 1
FROM PATCHLINK_PATCH_STATUS
WHERE P.UID = PATCHLINK_PATCH_STATUS.PATCHUID
AND PATCHLINK_PATCH_STATUS.STATUS IN ( 0 )) ))
AND L.NAME RLIKE 'Client Services|Marketing'
ORDER BY MACHINE_NAME,
P.TITLE
The problem is though it gives you all the patches with "PATCHED" (which on some machines can be as much as 225) and I only need the patches for the past week or the night that it actually updated. I know it has something to do with Deploy Date I just don't know the code. Please let me know if you have any questions or I need to explain it better.
Thanks.
Basically I am trying to figure out how to narrow down the amount of information you get when you have a report tell you what was patched on the machine. Currently I am using this:
SELECT CONCAT(M.NAME, "\\", M.SYSTEM_DESCRIPTION) AS MACHINE_NAME,
P.IDENTIFIER AS KB_ARTICLE,
P.TITLE AS DISPLAY_NAME
FROM MACHINE_LABEL_JT MJ,
MACHINE M,
LABEL L,
PATCHLINK_MACHINE_STATUS S,
KBSYS.PATCHLINK_PATCH P
WHERE M.ID=MJ.MACHINE_ID
AND L.ID=MJ.LABEL_ID
AND M.ID = S.MACHINE_ID
AND S.PATCHUID = P.UID
AND S.STATUS = 'PATCHED'
AND (( 1 IN (SELECT 1
FROM PATCHLINK_PATCH_STATUS
WHERE P.UID = PATCHLINK_PATCH_STATUS.PATCHUID
AND PATCHLINK_PATCH_STATUS.STATUS IN ( 0 )) ))
AND L.NAME RLIKE 'Client Services|Marketing'
ORDER BY MACHINE_NAME,
P.TITLE
The problem is though it gives you all the patches with "PATCHED" (which on some machines can be as much as 225) and I only need the patches for the past week or the night that it actually updated. I know it has something to do with Deploy Date I just don't know the code. Please let me know if you have any questions or I need to explain it better.
Thanks.
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
dchristian
13 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.