Duplicate software models being created during Automatic SMR creationDescriptionIf the system properties com.snc.samp.automaticsmcreation and/or com.snc.samp.automaticsmrcreation are turned on, we might see duplicate software models being created at the end of every reconciliation run. CauseFor installs where the normalized publisher and normalized product become out of sync with the discovery model's publisher and product, an existing software model cannot be tied to the install and, therefore, a new one is created.ResolutionUse this script to sync up the installation and discovery model data - var gr = new GlideRecord('cmdb_sam_sw_install');gr.addEncodedQuery('norm_productISNOTEMPTY^norm_productNSAMEASdiscovery_model.norm_product^NQnorm_publisherISNOTEMPTY^norm_publisherNSAMEASdiscovery_model.norm_publisher');gr.query();while (gr.next()) { gr.setValue('norm_product', gr.discovery_model.norm_product); gr.setValue('norm_publisher', gr.discovery_model.norm_publisher); gr.update();}Additional InformationFor cleaning up any duplicate software models that have been created before the fix was applied -Please use this script to find all duplicate software models - var fieldList = ['manufacturer', 'product', 'version', 'version_operator', 'edition', 'edition_operator', 'platform', 'language', 'named_user_type', 'database_option', 'install_condition', 'database_option_condition', 'subscription_condition'];var ga = new GlideAggregate('cmdb_software_product_model');ga.addAggregate('COUNT');for (var i = 0; i < fieldList.length; i++) { ga.groupBy(fieldList[i]);}ga.query();while (ga.next()) { var count = parseInt(ga.getAggregate('COUNT'), 10); if (count > 1) { var message = 'There are ' + count + ' software models with the values\n'; for (var i = 0; i < fieldList.length; i++) { message += fieldList[i] + ': ' + ga.getValue(fieldList[i]) + '\n'; } gs.log(message); }} You can adjust the fieldList as needed. From there, you can find the software models in each group and verify that there are no entitlements associated with it (either through the related list on the software model, on the alm_license table, or from the 'missing_entitlements' field). We suggest the customer do some manual review before deleting those duplicates.