When upgrading the Policy Server to version 6.0, the following error message is displayed:
Process failed with exception "The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.MobileArmorUser' and the index name 'OneUserOneDomain'. The duplicate key value is (<Name of user>, ). Could not create constraint. See previous errors..."
This issue occurs when the upgrade detects a duplicate user in dbo.MobileArmorUser.
To resolve this issue, manually delete the duplicate user from dbo.MobileArmorUser.
-
Take note of the duplicate user that is stated in the error:
"The duplicate key value is (, )"
- Log on to the SQL Management Studio.
- Select the SQL database and navigate to Databases > MobileArmorDB.
- Right-click on MobileArmorDB then select Tasks > Back Up.
- Back up the database.
- Select the SQL database and navigate to Databases > MobileArmorDB > Tables.
-
Click on New Query then type in the following:
select * from dbo.MobileArmorUser where UserID = '<Name of duplicate user>'
- Take note of the duplicate user's "UserIndex".
-
Click on New Query again then type in the following:
delete from dbo.MobileArmorUser where UserIndex = '<Duplicate user's UserIndex>'
- Close the SQL Management Studio then re-run the Policy Server Installer.