/build/static/layout/Breadcrumb_cap_w.png

Comparing two machines

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

Answers (1)

Posted by: dchristian 12 years ago
Red Belt
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
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
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