Server Error in '/Altiris/NS' Application.
--------------------------------------------------------------------------------
Violation of PRIMARY KEY constraint 'PK_TaskTargetDeviceCache_Guid'. Cannot insert duplicate key in object 'dbo.TaskTargetDeviceCache'.
The statement has been terminated.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint 'PK_TaskTargetDeviceCache_Guid'. Cannot insert duplicate key in object 'dbo.TaskTargetDeviceCache'.
The statement has been terminated.
We think what one scenario that may cause this is having a Virtual Machine that is converted to a Physical one (or vice-versa), and that this is something we did not test prior to our release. We still do not know for certain that this is what happend, but we have confirmed with some of our customers who have seen this issue that they do VM conversions on occasion. The root-cause is as yet unknown.
Once you have identified the computers that show up in multiple tables (using the SQL query listed above), try deleting them through the NS console (if possible) and letting the record regenerate.
If the computers do not show up in the NS console (or if removing them & Re-adding them does not work), Contact Altiris support.
Notes for Support: Adjust the attribute for the "duplicate" computers to "Deleted" by updating the appropriate table. For example, if the machines that show up as duplicate are Virtual machines you would want to set the deleted attribute on the Physical partition table.
Applies To
NS 7.0 & SMS or CMS 7.0