Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Error updating organization "Violation of UNIQUE KEY constraint 'UQ_LocalizedLabelCheck'. Cannot insert duplicate key"

(0) ShareShare
ReportReport
Posted on by 550

I am trying to update an organization V.8.2.1.176 to V.8.2.5.4

it through following Error:

16:23:22|  Error| Installer Complete: OrganizationDatabaseHotFixer - Error encountered
16:23:22|  Error| Exception occured during Microsoft.Crm.Tools.Admin.OrganizationDatabaseHotFixer: Error.ActionFailed Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction
InnerException:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlClient.SqlException: Violation of UNIQUE KEY constraint 'UQ_LocalizedLabelCheck'. Cannot insert duplicate key in object 'MetadataSchema.LocalizedLabel'. The duplicate key value is (e1bd1119-6e9d-45a4-bc15-12051e65a0bd, Description, 1033, Jan  1 1900 12:00AM, 0).
The statement has been terminated.


I checked the object ID in "MetadataSchema.LocalizedLable" table , it refers to "Organization names" entity and has 3 records with "description","LocalizedName" and ,"LocalizedCollectionName" in column "ObjectColumnName" and different lables. All I could understand was that the description record -that is referenced by Error message was blank in label column (it was also blank in UI in customizations form).

I have filled it in table (directly using sql)

I have filled it by Crm UI ( by changing isrenamble column in entity properties in sql)

I have deleted all 3 record from "MetadataSchema.LocalizedLable" table

still no chance! same error at every try to update organization.

P.S.: organization is working smoothly right now!

*This post is locked for comments

  • Suggested answer
    Rawish Kumar Profile Picture
    Rawish Kumar 13,756 on at
    RE: Error updating organization "Violation of UNIQUE KEY constraint 'UQ_LocalizedLabelCheck'. Cannot insert duplicate key"

    MetadataSchema.LocalizedLabel'. The duplicate key value is (e1bd1119-6e9d-45a4-bc15-12051e65a0bd, Description, 1033, Jan  1 1900 12:00AM, 0)

    did you find anything with above id?  in MetadataSchema.LocalizedLabel.

    Alternatively I have strong feeling that you are missing minor rollups  between V.8.2.1.176 and V.8.2.5.4. which can cause this issue too.

    https://blogs.msdn.microsoft.com/crminthefield/2013/07/11/microsoft-dynamics-crm-2015-2013-and-2011-update-rollups-and-service-packs-release-dates-build-numbers-and-collateral/

    https://buildnumbers.wordpress.com/crm/  

  • nima19864 Profile Picture
    nima19864 550 on at
    RE: Error updating organization "Violation of UNIQUE KEY constraint 'UQ_LocalizedLabelCheck'. Cannot insert duplicate key"

    In fact I could not find a real duplicate in there.the message specifically points to label column and a record related to organization entity that its label is description . It was blank but not duplicate.I tried filling it but error is still there. I did delete row , very the same.

    Executing query that is provided by link you sent returned that there is not customization level column in table.

  • Suggested answer
    Rawish Kumar Profile Picture
    Rawish Kumar 13,756 on at
    RE: Error updating organization "Violation of UNIQUE KEY constraint 'UQ_LocalizedLabelCheck'. Cannot insert duplicate key"

    Not sure how but in MetadataSchema.LocalizedLable has some duplicate value.  

    could you please check what do you see in that schema. have a lookk here : community.dynamics.com/.../37014

    He deleted the duplicate records and it worked.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans