When managing versioned data with operations such as compress or reconcile/post, the following error message may be returned:
Error: Violation of PRIMARY KEY constraint [value]. Cannot insert duplicate key in object [value]. The duplicate key value is [value].
Inconsistencies discovered between the adds and deletes tables, such as detached or duplicate rows in the delta tables or versioned business table. These inconsistencies can be caused by various editing methods, for example, skipping an intermediate version during reconcile/post.
Note: When reconciling versions, it is recommended to use the Reconcile Order tab in the Geodatabase Administration dialog box. For more information, refer to ArcMap: Recommended reconcile order.
To resolve this issue, identify and repair inconsistencies within the versioned tables, as described below:
Note: Only a geodatabase administrator has the privileges to run the diagnose and repair tools. Make sure to take a database backup and that no one is editing in the geodatabase before running the repair.
Note: Refer to the help documents for additional parameters for the tools. Links are listed below.