SQL Command failed while upgrading the project from ALM 11.52 to ALM 12.21

  • KM02023754
  • 14-Dec-2015
  • 14-Dec-2015

This document has not been formally reviewed for accuracy and is provided "as is" for your convenience.

Summary

SQL Command failed while upgrading the project from ALM 11.52 to ALM 12.21

Error

SQL Command failed while upgrading the project from ALM 11.52 to ALM 12.21

The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'td.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])

image text

Cause

It's not that the index already exists, but that there are duplicate values in the LS_LOGICAL_NAME field in the table itself which needs to be checked and changed

Fix

Run the below query to find the fields which have same value for column LS_LOGICAL_NAME and make changes so that all LS_LOGICAL_NAME columns are unique.

SELECT
    LS_LOGICAL_NAME,
    COUNT(*)
FROM
    LISTS
GROUP BY
    LS_LOGICAL_NAME
HAVING
    COUNT(*) > 1

Once that is done, continue the upgrade process.