Book a Demo

Author Topic: OLE DB duplicate key value error  (Read 4375 times)

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
OLE DB duplicate key value error
« on: November 19, 2014, 01:12:26 am »
Hi,

We've got a project on SQL Server + Version control. Users have a shared access running Checkouts/checkins on controlled packages.

They've experienced the following OLE DB error message : cannot insert duplicate key row in object dbo.t_operation with unique index UX_operation_ea_guid. the duplicate value is...

As it currently stands, all the class operations have been lost in the project, despite the fact that these operations exist in the controlled XML file.

Is this issue related with a DB config issue (e.g. in the SQL scripts to generate the tables), a use of the version control (some users run a Get Latest), or else?
Would it be recommended and safe to run a Project DB Integrity Check?

Thanks
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: OLE DB duplicate key value error
« Reply #1 on: November 19, 2014, 01:47:24 am »
Guillaume,

What happened?
Probably the best thing to do right now is to restore an SQL Server backup and then rollback all check-ins done after the date of the backup.

Someone must have done something weird to have triggered this.
First check if the operation with the given guid is not duplicated across the xmi files.
I can imagine that a combination of moving operations + check-out/undo checkout etc... might get you into trouble

If you don't want to go for the backup option you might also be able to restore the model by importing the previous versions of your xmi files into the model.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: OLE DB duplicate key value error
« Reply #2 on: November 19, 2014, 02:09:48 am »
I've seen that in the past but too long ago. Try Tools/Data Management/..Integrity...

q.

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Re: OLE DB duplicate key value error
« Reply #3 on: November 19, 2014, 02:36:54 am »
thanks for both your inputs - I don't have access to this project at the moment so I'm going to suggest running a DB first and keep the previous ones, before attempting the Integrity Check first.

I also need to gather more info

cheers

Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: OLE DB duplicate key value error
« Reply #4 on: November 19, 2014, 02:48:23 am »
The integrity is at no risk, though the dialog suggests it would. You should run it regularly anyway on a - say - weekly basis.

q.