K1000 Metered Software Report Per Device
I have the following SQL code that reports metered software per device. This works well, but there are two things that I am missing:
1) I'm not sure why Civil 3D is not showing up. We have metering enabled and it shows if I run the basic SAM_VIEW_DISCOVERED_APPLICATIONS or SAM_VIEW_MACHINE_DISCOVERED_SOFTWARE by themselves, but not in this script. Any help determining why this script is not showing Civil 3D software would be helpful
2) I'd like to modify this to show a date range, for example over the past 30 days, 60 days, or 90 days.
Help is appreciated!
SELECT M.NAME AS MACHINE,
M.USER_LOGGED,
SVTS.NAME AS PRODUCT_NAME,
SAM_METER_DATA.VERSION,
(SELECT COUNT(DISTINCT MACHINE_ID)
FROM SAM_VIEW_MACHINE_DISCOVERED_SOFTWARE X
WHERE X.ID = SVMDS_APPS.ID OR X.ID = SVMDS_SUITES.ID) AS INSTALL_COUNT,
ROUND(SUM(SAM_METER_DATA.SECONDS_USED) / 3600.0, 3) AS HOURS_USED,
SUM(SAM_METER_DATA.LAUNCHES) AS LAUNCHES,
MAX(SAM_METER_DATA.START) AS LAST_LAUNCHED
FROM SAM_METER_DATA
LEFT JOIN SAM_VIEW_MACHINE_DISCOVERED_SOFTWARE SVMDS_APPS
ON SAM_METER_DATA.TITLED_APPLICATION_ID = SVMDS_APPS.ID
AND SAM_METER_DATA.MACHINE_ID = SVMDS_APPS.MACHINE_ID
AND SAM_METER_DATA.VERSION = SVMDS_APPS.VERSION
LEFT JOIN CATALOG.TITLED_SUITE_APPLICATION_JT TSAJT
ON TSAJT.TITLED_APPLICATION_ID = SAM_METER_DATA.TITLED_APPLICATION_ID
LEFT JOIN SAM_VIEW_MACHINE_DISCOVERED_SOFTWARE SVMDS_SUITES
ON SVMDS_SUITES.ID = TSAJT.TITLED_SUITE_ID
AND SAM_METER_DATA.MACHINE_ID = SVMDS_SUITES.MACHINE_ID
LEFT JOIN SAM_VIEW_TITLED_SOFTWARE SVTS
ON SAM_METER_DATA.TITLED_APPLICATION_ID = SVTS.ID
JOIN MACHINE M ON M.ID = SVMDS_APPS.MACHINE_ID OR M.ID = SVMDS_SUITES.MACHINE_ID
GROUP BY SAM_METER_DATA.TITLED_APPLICATION_ID,SAM_METER_DATA.MACHINE_ID
ORDER BY M.NAME, PRODUCT_NAME
PS. This script is stolen from here: https://www.itninja.com/blog/view/k1000-reports-reports-to-list-metering-information-for-standalone-application-and-applications-within-a-suite
Answers (0)
Be the first to answer this question