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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

FOREIGN KEY conflict in AxBuild xppcompileall

(0) ShareShare
ReportReport
Posted on by 314

Hello All

In the log file I get the below error. This below is in the AOTComp.txt file.

!!! X++ execution error: Cannot execute a stored procedure
!!! X++ execution error: [Microsoft][SQL Server Native Client 11.0][SQL Server]The INSERT statement conflicted with the

Looking at the trace log

Error occurred:
User ID: -AOS-
Time: 11:34:24 am 7/7/2017
Version: Microsoft Dynamics AX 6.3 (Build number 1000.309)
Database: Microsoft SQL Server
SQL statement: { CALL [AX2012R3DEV02_model].[dbo].[XU_InsertByParentHandle](?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) } [ID=0, Reused=@sys2048]
Error text: [Microsoft][SQL Server Native Client 11.0][SQL Server]The INSERT statement conflicted with the FOREIGN KEY constraint "FK_ModelElementData_HasModelId_LayerId". The conflict occurred in database "AX2012R3DEV_Model", table "dbo.Model".
SQL error code: 547

Has anyone come across this ?

Thanks

Abby

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Mea_ Profile Picture
    60,284 on at
  • Abby Abraham Profile Picture
    314 on at

    Thank you! This resolved the issue. However why would this happen?

    All I did was delete the user layer model and compiled. This should not cause any ID conflicts.

    -Abby

  • Mea_ Profile Picture
    60,284 on at

    I don't think that anyone knows the reason, I saw couple of similar issues with corrupted IDs in model store, they were reported to MS and they came with similar blogs offering workarounds, but probably were not able to find and fix root cause as well.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans