We have suddenly started running into errors when attempting to publish to a MDS entity, both from the Excel add-in and the Web application.
When trying to add a member using the web app we encounter the error "2601: cannot insert duplicate key row in object 'mdm.tbl_2_30_EN' with unique index 'ux_tbl_2_30_EN_Version_ID_Code'. The duplicate key value is (2, 106229)."
I have queried the table mdm.tbl_2_30_EN and it seems that ID 106229 would be the next key created. It does not exist yet, so I do not know why this error is occurring.
Has anybody ran into this problem using MDS before? Why would this entity suddenly become corrupted somehow?
Any ideas would be appreciated.
My error is occurring on a different index though.
The unique index in my problem is "ux_tbl_2_30_EN_Versoin_ID_Code", while Olly's error was occurring in "ix_tbl_3_38_EN_Version_ID_VersionMember_ID".
I'm sorry, but I don't understand how to relate that solution to my problem.
You might be having a similar problem, where the index you mentioned was supposed to be a filtered index but inadvertently got modified to be a regular index, which would indicate the duplicate error problem. You may need to figure out if this is the case by looking at the schema history report for the database (right click DB -->reports-->schema history...)
Satish Kartan http://www.sqlfood.com/