When creating a new published application in AppCenter, an error “Object not found” is returned.
On the XenApp server used for the Discovery in the AppCenter, a CDF trace captured on all IMA modules shows one of the following message:
SQL Error 2 1: [Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY KEY constraint 'c1'. Cannot insert duplicate key in object 'dbo.KEYTABLE'. The duplicate key value is (xxxxx).
or
SQL Error 2 1: [Microsoft][ODBC SQL Server Driver][SQL Server]Violation of UNIQUE KEY constraint 'c2'. Cannot insert duplicate key in object 'dbo.KEYTABLE'. The duplicate key value is (xxx, 0x12346578456123101234150154463454345897642113210).
It is recommended to take a backup of the datastore prior to using one of this solution.
Violation of PRIMARY KEY constraint 'c1':
This happens when the value given to the nodeid is not unique, this is caused by an incorrect range of identity values as explained in the following case study http://support.citrix.com/article/CTX129794.
Resetting the identity range with DBCC CHECKIDENT resolves the issue. For more information refer to https://msdn.microsoft.com/en-us/library/ms176057.aspx.
Violation of UNIQUE KEY constraint 'c2'.
This constraint is a combination of ParentID and RDN values which must be unique.
The problem occurs when indexes are not updated. This issue is resolved by recreating the indexes on all tables with the following commands:
alter index all on keytable rebuild
alter index all on indextable rebuild