Can I create a report that just lists the computer name and the services running on the computer?
Hi
Currently I am using a report that gives me the computer name, and the software name running on the machine. The output of the report is like this:
computer1, software1
computer1, software2
...
computer2,softwarea
computer2,softwareb
This is the SQL query for the report
select MACHINE.NAME as Computer_Name, DISPLAY_NAME as Software_Name, DISPLAY_VERSION as Software_Version
from (SOFTWARE, MACHINE_SOFTWARE_JT, MACHINE)
where MACHINE.ID = MACHINE_SOFTWARE_JT.MACHINE_ID and MACHINE_SOFTWARE_JT.SOFTWARE_ID = SOFTWARE.ID
and not IS_PATCH
order by Computer_Name
Answers (2)
Nevermind, I figured out the SQL query
select MACHINE.NAME as Computer_Name, NTSERVICE.NAME as Service_Name
FROM NTSERVICE
left join NTSERVICE_LABEL_JT on NTSERVICE.ID = NTSERVICE_LABEL_JT.NTSERVICE_ID
left join MACHINE_NTSERVICE_JT on MACHINE_NTSERVICE_JT.NTSERVICE_ID = NTSERVICE.ID
join MACHINE on MACHINE_NTSERVICE_JT.MACHINE_ID = MACHINE.ID
WHERE ((( exists (select 1 from MACHINE,MACHINE_NTSERVICE_JT where NTSERVICE.ID = MACHINE_NTSERVICE_JT.NTSERVICE_ID and MACHINE.ID=MACHINE_NTSERVICE_JT.MACHINE_ID)) ))
order by Computer_Name