Uninstalled Oracle DB installations are not being removed from "Software Installation" (cmdb_sam_sw_install) TableIssue The Oracle DB Standard software has been removed/deleted from a few Configuration Item's (CI) and post that when discovering the Configuration Item's (CI) could see that the respective Oracle DB software is not getting removed from Software Install (cmdb_sam_sw_install) table.ReleaseAny release with Discovery plugin enabledCauseThe software installs for the Database Server are created/deleted based on the "cmdb_ci_appl" table.If the application is present in the applications table after discovery is run, we assume the install is present on the Configuration Item (CI) . If the application is deleted, delete the install too."Sync Installed Software" BR takes care of this sync https://<your-instance>.service-now.com/nav_to.do?uri=sys_script.do?sys_id=aae1720453332200d0daae4a16dc344c Out of the box discovery deletes the uninstalled software in the following way, "CMDBSoftwareHelper" java class invokes the RelatedListReconciler.reconcile() which deletes the record only when "created_by_application_pattern" is "false".If it is set to "true", it will skip the record and will not delete it. In this case, it is "true" for the Oracle DB Server record. ==================CMDBSoftwareHelper.java==================Map<String, String> deleteExceptions = new HashMap<>();deleteExceptions.put(CREATED_BY_APPLICATION_PATTERN, "true");dr.setDeleteRecord(true);dr.setDebug(fDebug);dr.setDeleteException(deleteExceptions);// add encoded query for the reconciler to use when grabbing records from DB so that we only consider// reconciling against software install records that we have inserted ourselves (assume empty source was us too)String discoverySourceFilter = DISCOVERY_SOURCE + EQUALS + fDiscoverySource + QUERY_TERM_SEPERATOR + OR + DISCOVERY_SOURCE + ISEMPTY;dr.setAdditionalDbFilter(discoverySourceFilter);dr.reconcile(new ArrayList(discoveredSoftware), DISPLAY_NAME + "," + VERSION); =================RelatedListReconciler.java=================// Go through the delete exceptions and see if this Gr is one of the exceptionboolean delete = true;for(String key : fDeleteException.keySet()) {if (fDeleteException.get(key).equals(gr.getValue(key))) {delete = false;break;}}if (delete) {if (fDeleteRecord) {debug("delete", gr);gr.delete();} else {markAbsent(gr);debug("MarkAsAbsent", gr);gr.update();}} Since this is "true" in "gr.", it marks the delete as false, if (fDeleteException.get(key).equals(gr.getValue(key)) Who sets the "created_by_application_pattern" to "true" in the record? Take a look at the Discovery status, "Oracle DB on Unix pattern" is launched which invokes a post-processing pattern script "Sync Installed Software" gr = new GlideRecord("cmdb_sam_sw_install");gr.setValue("display_name", displayName);gr.setValue("version", version);gr.setValue("installed_on", installedOn);gr.setValue("publisher", publisher);gr.setValue("created_by_application_pattern", true);gr.setValue('discovery_source', 'ServiceNow');softwareSysId = gr.insert();gs.log("creating installed software: " + displayName + " " + version);gs.log("software sys id: " + softwareSysId);} Here is where exactly the Software installation record is getting inserted with "created_by_application_pattern" to true.During the Discovery, Oracle DB on Unix pattern is launched which invokes the post-processing script. This Oracle instance process classifier launches the pattern, https://<your-instance>.service-now.com/nav_to.do?uri=discovery_classy_proc.do?sys_id=8c7f114d37530000dadacffbcfbe5d3a Based on the condition defined in the above process classifier "Command - starts with - ora_pmon_", if the running processes list still returns the Oracle DB server records in the Unix - Application Dependency Mapping payload the process classifier triggers the Oracle DB on Unix pattern that populates application (cmdb_ci_appl) table.Followed by a post-processing script that inserts the record into the Software installation table and sets the "created_by_application_pattern" to "true".ResolutionSince the processes are still running and the post-processing script inserts the record into the Software installation table and sets the "created_by_application_pattern" to "true" for the discovery to delete the uninstalled software, the respective processes have to be uninstalled/removed from the respective Configuration Item (CI). To validate if the processes are running towards the Configuration Item's (CI) , "ps -ef" SSH Command can be executed towards the CI via "ecc_queue".Related LinksDelete uninstalled software from the Software Installation table Resolve duplicate software installations