Skip to main content

I have created a snapshot without attachments and wiki and exported it to XML from a production instance. When I attempt to restore the snapshot to a different (test) instance, I get an error:

 - Violation of PRIMARY KEY constraint 'Note_PK'. Cannot insert duplicate key in object 'dbo.Note'.

 

When I do a search in the notes.xml file from the snapshot export, the id identified in the error message is

 

<row NoteText="" GraphType="PX.SM.EmailSendReceiveMaint" EntityType="PX.SM.EMailAccount" NoteID="e6ed61c5-0122-ec11-9b48-00224843cfc4" />

 

The test instance to which I am restoring already has a older version of the same data. How should I resolve this?

 

 

Hi @KMcGuire,

The error message indicates that the duplicate key value causing the violation, which corresponds to the NoteID column in the 'dbo.Note' table.

If the data in the snapshot is the correct and updated version, you can delete the conflicting record from the 'dbo.Note' table in the test instance.

 

“Ensure you have a backup of the test instance's data before performing any delete operations.”


Retry the snapshot restoration process to the test instance

Hope it helps!

Regards,

Sweta


@sweta68 I also encountered this error yesterday.  I successfully restored the snapshot after deleting the conflicting record.  I was able to delete it because I was restoring to an on-premise tenant for which I have access to the database.  Several related questions: how would I resolve this if encountered restoring in an Acumatica-hosted SaaS tenant for which I don’t have access to the database.  Is there a remedy other than submitted a support case to have the Acumatica Support team delete it?  What causes this situation, how can it be avoided?


Reply