ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

In CA Asset Portfolio Management 14.1, we have assets that will not delete. Unable to delete them through the graphical interface or using the data importer.

book

Article ID: 8556

calendar_today

Updated On:

Products

CA IT Asset Manager CA Software Asset Manager (CA SAM) ASSET PORTFOLIO MGMT- SERVER CA Service Management - Asset Portfolio Management CA Service Management - Service Desk Manager

Issue/Introduction

We are unable to delete some of our assets, either through the graphical interface or using the data importer.

The data importer errors with: 

1. The DELETE statement conflicted with the REFERENCE constraint "AL_LICENSE_METRIC_FK01" 
The conflict occurred in database "MDB", table "dbo.al_license_metric", column 'license_id'. 
2. The DELETE statement conflicted with the REFERENCE constraint "AL_PROD_RIGHTS_AL_LICNS_FK01" 
The conflict occurred in database "MDB", table "dbo.al_product_rights", column 'license_id'. 
3. The DELETE statement conflicted with the REFERENCE constraint "FK_AL_ASSOCIATED_LIC_AL_LICENS" 
The conflict occurred in database "MDB", table "dbo.al_associated_licenses", column 'license_id'.  

Cause

This error only occurs if you have previously installed the older CA Software Compliance Manager product against the mdb. 

 

Environment

CA Asset Portfolio Management 12.x, 14.x, or 17.x

Resolution

Follow these steps to resolve the problem: 

1.  In SQL Server management studio, backup the data into temporary '_backup' tables

select * into al_lm_criteria_backup from al_lm_criteria
select * into al_metric_covered_product_backup from al_metric_covered_product
select * into al_license_metric_backup from al_license_metric
select * into al_product_rights_backup from al_product_rights
select * into al_associated_licenses_backup from al_associated_licenses 


2.  Run the following deletes with a 'rollback tran' to test: 

begin tran 
delete from al_lm_criteria 
delete from al_metric_covered_product 
delete from al_license_metric 
delete from al_product_rights 
delete from al_associated_licenses 
rollback tran 

3.  If no errors after running the delete statements above, then execute the deletes with a commit tran: 

begin tran 
delete from al_lm_criteria
delete from al_metric_covered_product
delete from al_license_metric
delete from al_product_rights
delete from al_associated_licenses
commit tran 

4. Stop the APM services

5. Perform an IISRESET (on both APM application and APM web servers)

6. Start the APM services

7. Retest deleting the asset (with data importer or through the graphical interface)