Skip to main content

Hello everyone,
I’m trying to create a new instance of an existing database but I get an exception with the following error.

Kindly assist



Violation of PRIMARY KEY constraint 'UPHistory_PK'. Cannot insert duplicate key in object 'dbo.UPHistory'. The duplicate key value is (5).
The statement has been terminated.
 --------------------------------------
 Inner Exception:
 Violation of PRIMARY KEY constraint 'UPHistory_PK'. Cannot insert duplicate key in object 'dbo.UPHistory'. The duplicate key value is (5).
 The statement has been terminated.
 




​​​​

From the database this is how the situation looks like;
 



NB:database was moved to a different server.

​​Any kind of response will be highly appreciated

Hi @development93  Usually, we will get this issue when we try to insert the same details in the table, and due to key fields, it is throwing this error.

 


Hi @development93  Usually, we will get this issue when we try to insert the same details in the table, and due to key fields, it is throwing this error.

 

since the table keeps history of application update.
would deleting the available data solve the issue?


Hi @development93 

Thanks


Reply