cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Summary

This article will how to solve the issue FOREIGN KEY constraint "FK_InstalledSoftwareData_ComplianceComputer" , you may hit during the FNMP product running Reconcile import.

Symptoms

A Reconcile (Update inventory for reconciliation) import may run into failure with following error message

ApplicationCompletion

"Failed to execute Writer 'ApplicationCompletion' from file C:\ProgramData\Flexera Software\Compliance\ImportProcedures\Inventory\Writer\InstalledSoftware.xml
Error: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_InstalledSoftwareData_ComplianceComputer". The conflict occurred in database "FNMSCompliance", table "dbo.ComplianceComputer_MT". "


Cause

This is very likely a one off transient error, caused by a computer getting removed at a key step in the writers during import

Resolution

Please have another import to run and make sure no other operators process , in particular removing any computers, the issue should not be recurred.

Workaround

Have another import to run and make sure no other operators process , in particular removing any computers, the issue should not be recurred.

Additional Information

-- Details logging looks like below:

2015-09-15 14:01:43,423 [INFO ] ApplicationCompletion
2015-09-15 14:04:19,216 [INFO ] Failed to execute Writer 'ApplicationCompletion' from file C:\ProgramData\Flexera Software\Compliance\ImportProcedures\Inventory\Writer\InstalledSoftware.xml
Error: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_InstalledSoftwareData_ComplianceComputer". The conflict occurred in database "FNMSCompliance", table "dbo.ComplianceComputer_MT".
Warning: Null value is eliminated by an aggregate or other SET operation.
Updated 0 Installed Applications that have changed in the source database connections.
Installed Application: Updated 0 Installed Applications that have changed in the source database connections.
The statement has been terminated.
Added 0 new Installed Applications from the source database connections.
Installed Application: Added 0 new Installed Applications from the source database connections.
Inserted 0 related installed software records
Updated 4636 application record actions
2015-09-15 14:04:19,216 [INFO ] All retries have been attempted for Writer 'ApplicationCompletion'
2015-09-15 14:04:19,325 [ERROR] System.Data.SqlClient.SqlException (0x80131904): The INSERT statement conflicted with the FOREIGN KEY constraint "FK_InstalledSoftwareData_ComplianceComputer". The conflict occurred in database "FNMSCompliance", table "dbo.ComplianceComputer_MT".
Warning: Null value is eliminated by an aggregate or other SET operation.
Updated 0 Installed Applications that have changed in the source database connections.
Installed Application: Updated 0 Installed Applications that have changed in the source database connections.
The statement has been terminated.
Added 0 new Installed Applications from the source database connections.
Installed Application: Added 0 new Installed Applications from the source database connections.
Inserted 0 related installed software records
Updated 4636 application record actions
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at ManageSoft.Compliance.Importer.Logic.XML.Writer.Execute(IExecutionContext context)
at ManageSoft.Compliance.Importer.Logic.ComplianceImporter.ExecuteWriters(ComplianceReader p_ComplianceReader, IExecutionContext context, String singleConnectionIdentifier)
ClientConnectionId:2a238b1d-377d-4d04-b533-7f24ef5ea0be
Error Number:547,State:0,Class:16
2015-09-15 14:04:20,091 [INFO ] Completed with error in 2 minutes, 36 seconds
Was this article helpful? Yes No
No ratings
Version history
Last update:
‎Jan 28, 2019 08:10 PM
Updated by: