Anyone know how to pull up a report which compares two machines and shows us the differences?

For example we have machines which should have the same software installed. We would like to be able to run a report or something like this which will show us the differences.
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Hey Mac456,

I think this report will do what you need.

Just make sure you change the machine names.

There called xxMachine1 and xxMachine2.

There's two changes required for each.
SELECT *
FROM (SELECT Coalesce(M. NAME, ') AS MACHINE1,
Coalesce(S.DISPLAY_NAME, ') AS MACHINE1_SOFTWARE_NAME,
Coalesce(S.DISPLAY_VERSION, ') AS MACHINE1_SOFTWARE_VERSION,
Coalesce(MACHINE2.`NAME`, ') AS MACHINE2,
Coalesce(MACHINE2.DISPLAY_NAME, ') AS MACHINE2_SOFTWARE_NAME,
Coalesce(MACHINE2.DISPLAY_VERSION, ') AS MACHINE2_SOFTWARE_VERSION
FROM MACHINE M
JOIN MACHINE_SOFTWARE_JT MS
ON ( M.ID = MS.MACHINE_ID )
JOIN SOFTWARE S
ON ( MS.SOFTWARE_ID = S.ID )
LEFT JOIN (SELECT M. NAME,
S.DISPLAY_NAME,
S.DISPLAY_VERSION,
S.ID AS SOFT_ID
FROM MACHINE M
JOIN MACHINE_SOFTWARE_JT MS
ON ( M.ID = MS.MACHINE_ID )
JOIN SOFTWARE S
ON ( MS.SOFTWARE_ID = S.ID )
WHERE M. NAME = 'xxMachine2' -- MACHINE 2 NAME HERE
) MACHINE2
ON ( MACHINE2.SOFT_ID = S.ID )
WHERE M. NAME IN ( 'xxMachine1' ) -- MACHINE 1 NAME HERE
UNION
SELECT ' AS MACHINE1,
' AS MACHINE1_SOFTWARE_NAME,
' AS MACHINE1_SOFTWARE_VERSION,
M. NAME AS MACHINE2,
S.DISPLAY_NAME AS M2_SOFTWARE_NAME,
S.DISPLAY_VERSION AS M2_SOFTWARE_VERSION
FROM MACHINE M,
MACHINE_SOFTWARE_JT MS,
SOFTWARE S
WHERE M.ID = MS.MACHINE_ID
AND MS.SOFTWARE_ID = S.ID
AND M. NAME = 'xxMachine2' -- MACHINE 2 NAME HERE
AND S.ID NOT IN (SELECT S.ID
FROM MACHINE M,
MACHINE_SOFTWARE_JT MS,
SOFTWARE S
WHERE M.ID = MS.MACHINE_ID
AND MS.SOFTWARE_ID = S.ID
AND M. NAME = 'xxMachine1' -- MACHINE 1 NAME HERE
)) TEMPER
ORDER BY MACHINE1 DESC,
MACHINE2 DESC,
MACHINE1_SOFTWARE_NAME,
MACHINE2_SOFTWARE_NAME
Answered 03/12/2012 by: dchristian
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity