Hi

This blog is about the new feature introduced in Desktop Central.

The new feature is called Query Executor (available under Admin -> Tools -> Query Executor.  This feature is supported from build 60316.  If you don’t see this feature you can contact the tech support).  You can use it as SQL query executor.  Being a initial version you can send in your requirement and get the query from the Desktop Central Support Team.  Later, this can be improvised according to the need.

Query Executor can be used to generate custom reports which are not available ready-made with DC and many more what you like to generate out of DC.  For example, regarding the conficker worm, how to get the list of computers where intended patch KB 958644 (Bulletin ID : MS08-067) is installed or computers where the patch is missing.  Below given is the query to achieve the task using DC Query Executor.

Query to get the list of computers where the patch – KB 958644 (MS08-067) is Installed
select resource.name, patch.patchid, patch.bulletinid, affectedpatchstatus.status from affectedpatchstatus inner join patch on patch.patchid = affectedpatchstatus.patch_id inner join resource on resource.resource_id = affectedpatchstatus.resource_id where BULLETINID=”MS08-067″ and status=”Available”;
Query to get the list of computer where the patch – KB 958644 (MS08-067) is Missing

select resource.name, patch.patchid, patch.bulletinid, affectedpatchstatus.status from affectedpatchstatus inner join patch on patch.patchid = affectedpatchstatus.patch_id inner join resource on resource.resource_id = affectedpatchstatus.resource_id where BULLETINID=”MS08-067″ and status=”Missing”;
Note :  The query will be executed on the last scan data.
Give a try and cast your opinion.
Cheers
Romanus

  1. harshad Dhuri

    hi Romanus, can you please share the query for patch compliance report as well as asset inventory.

  2. Thanks for the update folks..

    cheers
    Romanus

  3. JC

    Yea, that worked great. Thanks!

  4. Anand

    Hi JC,

    I think the issue is with the quotes.

    …where BULLETINID=”MS08-067? and status=”Missing”;

    here copy the query and instead of using the quotes given replace the double quotes while executing the query.

    It works for me..

    Anand

  5. JC

    This is a great feature.
    But I get an error on both queries.
    Unable to Execute the query. Please Check the Query com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 1