/build/static/layout/Breadcrumb_cap_w.png

Does anyone have a sql report query for manage install details view

I want to display a report like manage install detail when show all manage install task, and add a column for installed date. I tried to find the table but haven't found it yet



0 Comments   [ + ] Show comments

Answers (1)

Posted by: JasonEgg 3 years ago
Red Belt
0

So "install date" is a bit tricky: it doesn't exist in the tables "MI" nor "MI_ATTEMPT". AFAIK, the only way to get a good idea of the actual "install date" is to use asset history to see the first time an app was detected. However, you only retain that information if you configured the settings in "Settings" > "History" > "Assets" (under "Subscriptions) > "Computer"

That being said, here's a query that will get you some of the info:

SELECT 
S.DISPLAY_NAME as "SOFTWARE_TITLE",
CASE
        WHEN J.SOFTWARE_ID IS NULL THEN 'NOT INSTALLED'
        ELSE 'INSTALLED'
    END AS 'STATUS',
    MACHINE.NAME,
    MACHINE.USER_LOGGED,
    MACHINE.IP,
    MACHINE.LAST_SYNC,
    A.ATTEMPT_COUNT
FROM
    MI_ATTEMPT A
        JOIN
    MI ON MI.ID = A.MI_ID
        JOIN
    MACHINE ON A.MACHINE_ID = MACHINE.ID
        JOIN
    SOFTWARE S ON S.ID = MI.SOFTWARE_ID
        LEFT JOIN
    MACHINE_SOFTWARE_JT J ON J.MACHINE_ID = MACHINE.ID
        AND J.SOFTWARE_ID = MI.SOFTWARE_ID
WHERE
    MI.ENABLED != 0
 
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