Fix for Violation of Primary Key Constraint Error

By - Feb 22, 2017

Symptom

When user posts in Apps, an error message pops out stating violation of primary key constraint.

Resolution

This issue is related to a bug with SQL Server. The details can be read here.

FIX: Sequence object generates duplicate sequence values when SQL Server 2012 or SQL Server 2014 is under memory pressure

Please manually reset the identity column for the table with the issue.

First, use the following query to check the current identity value of the fact table stated in the message.

Then, reset the identity value to a number that is greater than the current value.

In order to mitigate this issue going forward, please apply the latest Cumulative Update on your SQL server.


Facebooktwitterlinkedinmail