web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Violation of PRIMARY KEY constraint ‘PK_ModelElementData_ElementHandle’ error installing GSTUpdate hotfixes on Microsoft Dynamics AX2012 R2

(0) ShareShare
ReportReport
Posted on by

Dear All,

Now im Facing the Error, At the time of Installing the GST Hotfix.

Anyone Please Guide me to solve this issues.

"Microsoft.Dynamics.Setup.AxSetupException: AxUtil call returned errors:Violation of PRIMARY KEY constraint ‘PK_ModelElementData_ElementHandle’. Cannot insert duplicate key in object ‘dbo.ModelElementData’. The duplicate key value is (832375, 1)."

I alredy read below mentioned blog, i can't download the Special hotfix, it's shows that page is not available.

https://blogs.msdn.microsoft.com/axsupport/2014/01/08/violation-of-primary-key-constraint-pk_modelelementdata_elementhandle-error-installing-some-hotfixes-on-microsoft-dynamics-ax-2012-r2/

Thanks in Advance.

Chandru

*This post is locked for comments

  • Suggested answer
    Mohsin Khalid Profile Picture
    501 on at

    Hi Chandrakumar;

    I was able to open the hotfix request page from this link, see if it works for you.

    support.microsoft.com/.../kbhotfix;kbln=

  • Community Member Profile Picture
    on at

    Hi Dear,

    Im Getting this Only

    0830.Untitled.jpg

  • Suggested answer
    Mohsin Khalid Profile Picture
    501 on at

    Use it through this specific link; I think you might have missed out the Accept agreement which is causing an issue on redirection

    " support.microsoft.com/.../kbhotfix;kbln= " 

    It opens up the below page:

    hotfixlink.png

  • Suggested answer
    Asif Bhimla Profile Picture
    90 on at

    Hi Chandrakumar,

    Can you check if you have any orphaned elements in your model database? You can use the below query to find if any elements that does not have parent based on ParentHandle or Root handle.

    SELECT * FROM [dbo].[MODELELEMENT] AS Element

    WHERE NOT (EXISTS (

    SELECT 'x' FROM [dbo].[ModelElementData] AS Data

    WHERE Element.ElementHandle = Data.ElementHandle

    ))

    ORDER BY Element.Name ASC

    SELECT * FROM [dbo].[MODELELEMENT] AS Element

    WHERE

    (

    Element.ParentHandle <> 0 AND

    NOT (EXISTS (

    SELECT 'x' FROM [dbo].[ModelElement] AS Parent

    WHERE Parent.ElementHandle = Element.ParentHandle

    ))

    )

    OR (

    Element.RootHandle <> 0 AND

    NOT (EXISTS (

    SELECT 'x' FROM [dbo].[ModelElement] AS Parent2

    WHERE Parent2.ElementHandle = Element.RootHandle

    ))

    )

    ORDER BY Element.Name ASC

    Thank you

    Asif

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
nmaenpaa Profile Picture

nmaenpaa 2 Moderator

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans