How to create a query which returns the computers which have a specific Software Package successfully installed ? Why 'Deployed OK' status does not work for this?

Document ID : KB000026499
Last Modified Date : 14/02/2018
Show Technical Document Details

Summary:                              

If we execute a query like this one:

Figure 1

We get the list of all machines which have the Package Name='package' deployed.

It means all machines which have a SD job for this package which is not in error status (eg: SW Delivering, SW Installed, SW Delivery Halted etc...).

But with this query it is not possible to see which machines have the package successfully installed.

 

Environment:                                              

CA Client Automation - All Version

 

Instructions:

In order to have a query which returns the list of machines which have a specific Software Package installed do this :

  1. Create a query for the Software Package you want to check and add argument : status='Deployed OK' (like in screenshot above).

  2. Right click on your query and select 'Export Definition' in popup menu. Give a name for a *.qry file.

  3. A file *.qry is created. Open this file with notepad.

    You should see a line like this one :

    sql=ca_discovered_hardware.dis_hw_uuid in (SELECT usd_applic.target FROM usd_applic, usd_actproc, usd_rsw WHERE $(RDS_BITSET4)($(RDS_BIN2INT)(usd_applic.task),0) AND usd_applic.actproc=usd_actproc.objectid AND usd_actproc.rsw=usd_rsw.objectid AND usd_applic.status IN (0,1,2,3,4,6,7,8,9,17,18,19,20,21,27) AND usd_applic.uninstallstate!=2 AND usd_rsw.itemname  =  'package').

    Replace the list of status code by only status code 9 :

    usd_applic.status IN (0,1,2,3,4,6,7,8,9,17,18,19,20,21,27)
    by
    usd_applic.status IN (9)

    Example :

    Figure 2

    Close and save the *.qry file.

  4. In DSM explorer right click on the folder which contains your query and select "Import Definition..." .

    Select the file .qry you just have modified. The query is imported.
  5. Execute the query, it returns only computers which have the package installed (status = SW Installed).