ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Cannot insert duplicate key in object 'dbo.fr_lock'.


Article ID: 200644


Updated On:


CA Test Data Manager (Data Finder / Grid Tools)



Violation of PRIMARY KEY constraint 'PK__fr_lock__3213E83F97B0B14D'. Cannot insert duplicate key in object 'dbo.fr_lock'. The duplicate key value is (DataViewController/ETO/dbo/FindandReserveModels).

What seems to be happening is the row in the fr_lock table not getting cleaned out before another record is inserted.





Release : 4.9.53

Component : CA Test Data Manager


Customer applied patch TDMWeb- and can no longer reproduce the issue.

Additional Information

It seems issue is not because of two users are trying to edit the F&R model at the same time but it is because user is trying to create the model for the same table twice before the expiry of fr_lock. For every fr_lock there is expiry and based on this a thread deletes the record.

Whenever user creates a F&R model a fr_lock gets created with expiration date and time into the fr_lock table and if he will again create the new F&R model for the same table then he will see the exception in logs only but model will gets created, he can use both the model but both the model will use the same table in gtrep.