emeadaxsupport: Violation of PRIMARY KEY constraint 'PK_ModelElementData_ElementHandle' error installing some hotfixes on Microsoft Dynamics AX 2012 R2
Greetings all, I want to pass along some information about a scenario where some customers have recently been unable to install some of our hotfix packages for our Microsoft Dynamics AX 2012 R2 release. The scenario only occurs if all of the following conditions are met in the environment where the hotfix is being installed:
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).
The statement has been terminated.
Error updating model database:
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).
The statement has been terminated.
This error was introduced into our hotfixes as an unexpected side effect of merging the Data Import Export Framework code into the SYP layer with our Cumulative Update 7 release, which also moved the DMF labels into the SYP layer. The error we are experiencing is because we were trying to import these same DMF labels again into the SYP layer with the installation of the hotfix.
We have addressed the root cause of the issue so that hotfix packages built now will not contain the DMF labels within the hotfix, and have also released a way for customers and partners who have existing hotfixes that are in this "broken" state to proceed. If you have experienced this issue, you can follow these steps to allow you to install the hotfix package that is currently giving the primary key violation error.
7. Open the models folder, and you should see contents similar to this:
8. Locate the file that ends with the text syplabels.axmodel and either move it out of that folder or delete it from this models folder.
9. Now paste in the copy of the DynamicsAX2012R2-KB2923180-SYPLabels.axmodel file you took in step 5 above by pressing Ctrl-V in the Models folder or using right-click and choosing Paste. At this point your folder contents should look similar to this.
10. At this point you should be able to go back to the folder where you see the file axupdate.exe and run it just like you normally would to install a hotfix package. Our hotfix installer will then attempt to install this revised version of the SYPLabels.axmodel file and should proceed without the error.
The label file provided will work for any hotfix that was experiencing this error, because it is a cumulative collection of all labels up to the point in time when we fixed the hotfix process. The name of this new SYPLabels.axmodel file does not need to be changed within the models folder, as our hotfix installer will attempt to install each model file within that folder.
If you have issues with this process, or if your auditing requirements for hotfix installation require you to receive a new hotfix package to replace the original hotfix package being installed, please open a support incident and reference this blog article with either the issue you are experiencing or the need for a hotfix package to be recreated.
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
|emeadaxsupport: New and updated content is available for cumulative update 6 for Microsoft Dynamics AX 2012 R2||Blog bot||DAX Blogs||0||27.06.2013 19:11|
|emeadaxsupport: Final Microsoft Dynamics AX 2012 R2 Content Available!||Blog bot||DAX Blogs||0||04.12.2012 06:12|
|DAX: A sneak peek tour: 4 Business Benefits of Microsoft Dynamics AX 2012 R2||Blog bot||DAX Blogs||0||03.12.2012 11:11|
|Sample Design Patterns: Book Give-away: 'Microsoft Dynamics AX 2012 Development Cookbook'||Blog bot||DAX Blogs||1||12.05.2012 16:55|
|dynamics-ax: Modeling the world, with Microsoft Dynamics AX 2012||Blog bot||DAX Blogs||0||25.01.2011 09:11|
|Опции темы||Поиск в этой теме|