Random problems caused by Primary Key errors in database

Random problems caused by Primary Key errors in database

Hi.

Since the release of build 8315 we have experienced a lot of bugs and crashes, and after that fix everything was back to normal.

During the process of trying to figure out the problem on build 8315 we have migrated with the Support our database from SQL to PostGreSQL and than again to SQL after we discover that the problem was related to an authentication module and fixed.

But since the roll back to SQL Server we are experiencing random errors and crashes.
One of the errors it's the Request History that some of the request became blank, no track at all.

Another it's the mail fetching that stops. ON the logs we always have the same issue:
[com.adventnet.servicedesk.workorder.action.WorkOrderAction]|[SEVERE]|[29]|:  Exception while trying to add WorkOrder|com.adventnet.persistence.DataAccessException: [WorkOrderHistory] Exception occured while inserting rows 
and after all the errors the reason:
UpdateException: Violation of PRIMARY KEY constraint 'WorkOrderHistory_PK'. Cannot insert duplicate key in object 'dbo.WorkOrderHistory'. The duplicate key value is (random number).

Any idea of how to fix this? it's generating a lot of stress...

                New to ADSelfService Plus?