Migrated our HP ALM to new windows server and sql server. Was able to migrate HP ALM to version 12.55 however projects fail to upgrade.
Getting the below error message after upgrading a project,
Exception occurred. Message: [Mercury][SQLServer JDBC Driver][SQLServer]The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name ‘dbo.LISTS’ and the index name ‘LS_LOGICAL_NAME_IDX’. The duplicate key value is (hp.qc.plan-status.imported).
Failed SQL: /* ~~QC */ CREATE UNIQUE NONCLUSTERED INDEX [LS_LOGICAL_NAME_IDX] ON [LISTS]([LS_LOGICAL_NAME])
In this case the issue is because there is a duplicate key in [dbo].[LISTS] table.
You may need to run the following query in order to identify which is the duplicated one : select * from [dbo].[LISTS] where ls_logical_name=’hp.qc.plan-status.imported’
In this case it seems that the value for the LS_NAME had been modified, the default value is "Imported" and in your case is "Feedback Provided".
So the application notices the original value does not exist so it insets it (as seen in the last upgrade attempt, after running it another one was created) and consequently this causes the index duplicate error.
For fixing this issue it is necessary to update the LS_NAME to the original value, then run the upgrade process and later you can update the records again and have the customized as desired. This will not affect the data that is already in the entities .
After that you may need to follow the next steps in order to resolve the issue:
To update the records a simple query like this can be used:
Update [td].[LISTS] set LS_NAME ‘Imported’ WHERE LS_ID = ‘355’