Standalone backup agent for Microsoft Windows servers and workstations (formerly Veeam Endpoint Backup FREE)
Post Reply
AlexLeadingEdge
Veteran
Posts: 456
Liked: 58 times
Joined: Dec 14, 2015 9:42 pm
Contact:

Violation of PRIMARY KEY constraint

Post by AlexLeadingEdge »

Hi guys,

My motherboard died last night and I replaced it this morning with one of the same make and model. I'm now getting this error message when a backup is manually or automatically run:

21/09/2017 10:10:06 AM :: Error: Violation of PRIMARY KEY constraint 'PK_GuestDatabase'. Cannot insert duplicate key in object 'dbo.Backup.Model.GuestDatabase'. The duplicate key value is (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). The statement has been terminated.

I tried to submit a ticket but I'm also getting this error message:

Online support system is temporarily unavailable, try again later.
AlexLeadingEdge
Veteran
Posts: 456
Liked: 58 times
Joined: Dec 14, 2015 9:42 pm
Contact:

Re: Violation of PRIMARY KEY constraint

Post by AlexLeadingEdge »

Finally got it to make a ticket: 02317970
Dima P.
Product Manager
Posts: 14396
Liked: 1568 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Violation of PRIMARY KEY constraint

Post by Dima P. »

Hi Alex,

Although the hardware replacement scenario should work (may result a new full due the change of bios uid), I can’t say much about this error. Please keep working with our support team and let us know how it goes. Cheers!
AlexLeadingEdge
Veteran
Posts: 456
Liked: 58 times
Joined: Dec 14, 2015 9:42 pm
Contact:

Re: Violation of PRIMARY KEY constraint

Post by AlexLeadingEdge »

Hi Dima,

They got me to rebuild the Veeam database using these instructions, seems to be working fine now:

Step 1 - Open up RegEdit
Step 2 - Look for HKEY_LOCAL_MACHINE\SOFTWARE\Veeam\Veeam Endpoint
Step 3 - Look for the DWORD value called ReCreateDatabase and assign to it 1 (decimal)
Step 4 - Close regedit, open up the services.msc console, and re-Start the Veeam Agent for Windows (or Endpoint) service manually.
Dima P.
Product Manager
Posts: 14396
Liked: 1568 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Violation of PRIMARY KEY constraint

Post by Dima P. »

Alex,

Looks like recreating the database is the cure against all issues. Thanks for sharing!
moctad_harry
Service Provider
Posts: 26
Liked: 4 times
Joined: May 28, 2019 1:42 pm
Full Name: Harry James
Contact:

Re: Violation of PRIMARY KEY constraint

Post by moctad_harry »

As a word of warning to anyone. This will wipe the backup job config and SMTP config from your agent.

I remapped the backup when re-creating the job via the wizard.

Running agent 4.0.1.2169 - Server Edition on WS2016
Dima P.
Product Manager
Posts: 14396
Liked: 1568 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Violation of PRIMARY KEY constraint

Post by Dima P. » 1 person likes this post

Hello Harry,

Sorry if that was left unnoticed in this thread and thanks for bringing this up. The mentioned key is usually distributed by support team, so their regular note is that such key will wipe all the agent settings completely (can call it a factory reset for your agent installation). Cheers!
Post Reply

Who is online

Users browsing this forum: Dima P. and 42 guests