Editing a Setup definition may fail with an exception like:
Setup update failed
Job update failed
Violation of PRIMARY KEY constraint 'PK_SetupD'. Cannot insert duplicate key in object 'dbo.SetupD'.
The statement has been terminated.
If this happens every time you edit a particilar Setup, the Setup definition that is saved in the database is corrupt. To repair this corruption, follow these steps:
1. Right click on the problem Setup and pick "Copy To".
2. Enter a new name to copy the problem Setup to a new name.
3. Delete the problem Setup.
4. Rename the new copy of the Setup back to the original name.