How to delete the inventory that is collected by heuristic scan?

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

Question:

Is it possible to delete the inventory that is collected by heuristic scan ?

 

Environment:

CA Client Automation - All Versions

CA Patch Manager - All Version 

 

Answer: 

Yes , You  can run SQL queries to  remove the data from  MDB. But it recommended to have backup copy of MDB before executing the delete queries. 

Here are the queries to DELETE ALL the heuristic data from the mdb


To check the availability of the data
========
use mdb
 select * from ca_software_def where source_type_id=3 order by name
 select * from ca_discovered_software where sw_def_uuid in (select sw_def_uuid  from ca_software_def where source_type_id=3)
 select * from ca_link_sw_def where source_type_id=3
 select * from ca_software_signature where source_type_id=3
 select * from ca_category_member where sw_def_uuid in   (select sw_def_uuid from ca_software_def where source_type_id=3)
 

To Delete all the Heuristic data. This will remove all the information from Categories as well
========
use mdb
 delete from ca_category_member where sw_def_uuid in (select sw_def_uuid from ca_software_def where source_type_id=3)
 delete from ca_software_signature where source_type_id=3
 delete from ca_link_sw_def where source_type_id=3
 delete from ca_discovered_software where sw_def_uuid in (select sw_def_uuid from ca_software_def where source_type_id=3)
 delete from ca_software_def where source_type_id=3


Please take a backup of mdb before running the above queries as a precautionary measure.
The DELETE Queries need to be run in the above order else they will fail.