Have tried to do the In-place upgrade on a Ax 2012 CU3 install with 3 additional KB's following the guidelines from here: http://technet.microsoft.com/en-us/library/jj733502.aspx
For the step "Import ISV-provided models into the development system", there are no isv layer changes but I do have a var layer model with my changes that was exported on a clean R2 install. I am treating this the same as if I were importing an isv layer change here. The var layer model has all the same changes for the existing var layer updated to R2. When I open Ax at this point to follow the "Data upgrade checklist for in-place upgrade" I am getting the following error:
Cannot select a record in Alerts - event inbox (EventInbox).The SQL database has issued an error.SQL error description: [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid column name 'PARTITION'.SQL statement: SELECT T1.INBOXID,T1.COMPANYID,T1.RULEID,T1.ALERTTABLEID,T1.ALERTCREATEDDATETIME,T1.ALERTCREATEDDATETIMETZID,T1.PARENTTABLEID,T1.USERID,T1.ISREAD,T1.SUBJECT,T1.ALERTEDFOR,T1.VISIBLE,T1.DELETED,T1.SENDEMAIL,T1.ALERTFIELDLABEL,T1.ALERTFIELDID,T1.TYPEID,T1.TYPETRIGGER,T1.SHOWPOPUP,T1.EMAILID,T1.EMAILRECIPIENT,T1.ALERTINSTANCERELATIONTYPE,T1.NOTIFICATIONSOURCE,T1.EPDRILLDOWN,T1.ISAGGREGATED,T1.NOTIFICATIONTYPE,T1.DUEDATETIME,T1.EMAILTEMPLATEID,T1.GLOBALRULE,T1.ENUMTYPE,T1.EXTENDEDDATATYPE,T1.CREATEDDATETIME,T1.DEL_CREATEDTIME,T1.RECVERSION,T1.PARTITION,T1.RECID,T1.MESSAGE,T1.KEYFIELDNAMELIST,T1.KEYFIELDNAMEDATA FROM EVENTINBOX T1 WHERE ((PARTITION=?) AND (((VISIBLE=?) AND (USERID=?)) AND (DELETED=?)))
I can't proceed past this point. What do I do next?
Ok. I see. I did some more poking around in the code to AxSetup and I found that it will display that page if it detects 6.0 installed. If my findings are correct, it will first search for the server by its component GUID, and then it will search for the AX Client by its GUID. You will find this in the namespace Microsoft.Dynamics.Setup.SideBySideHandler.Is60Installed().
Since the R2 Client use the same GUID, it will actually return true and that page will show IF the Ax Client is installed. Maybe this is not by design, but regardless it means that the step for choosing what model to import shows up even though I do not have the 6.0 AOS installed. All I need to have installed is a AX client.
Tommy Skaue | Dynamics AX Developer from Norway | http://yetanotherdynamicsaxblog.blogspot.no/ | www.axdata.no
Great! The "Installmode" was the final piece to the puzzle for me! I would kiss you, Kevin, but my wife would be jealous and you would feel awkward! ;-)
So I did NOT have the AOS installed, and I let the R2 Client, Debugger and Management Utils remain installed. I recovered my RTM database, uninstalled the R2 AOS, and ran upgrade of Database against the RTM database. I imported the R2 modelstore during setup. I have already explained why that page is shown during the wizard. :-)
I then opened command prompt and ran the following command:
axutil set /installmode /db:myaxdatabase_model /s:mysqlserver
If you only run "axutil set /installmode", it will try to find the database and server setup from the registry, which it won't find without the AOS installed. I bet this is independently of what version, however the axutil tool needs to be the R2 version, because this is the one that will look for the "_model"-database. I haven't debunked the code in the util, but I guess that is how it works.
I further installed the R2 AOS and it went through without any errors. If you wonder why it still installs temporary "TABLEPERTYPEINHERITANCEMODE" procedure, even though I did not explicitly upgrade an existing aos, it is due to setup checking the value SYSTABVERSION from SQLSYSTEMVARIABLES and if it is less than 119, it will understand this is an upgrade from RTM.
I finally have the entire storyline. I hope the guide gets updated soon. :-)
Hi Kevin and Skaue,
We have a customer who is on AX2012 CU3 and planning to move to AX2012 R2. We have already upgraded the code to AX2012 R2, we only want to upgrade the data from CU3 to R2.
We are following the below link which talks about both code and data upgrade
Can you please point us to the steps which we have to follow to only do data upgrade from CU3 to R2. Since the customer is not live(but have lot of setup data), we may only have to upgrade current test instance to R2.
If you have a prepared upgraded R2 compatible modelstore, based on the modelstore that was created when you installed the new R2 models from Microsoft to TEST. Then you should be ready to data upgrade first TEST, then later PROD. The steps for the data upgrade is now properly explained in that guide, as far as I can tell. The clue is to have the modelstore you are importing to TEST and PROD set in "installmode", otherwise things will go south.
The updated documentation for in-place upgrade is now live on TechNet - technet.microsoft.com/.../jj733502(v=ax.60).aspx
It will make its way into the next publication of the overall Upgrade Guide as well, but that takes a little more effort, so use the TechNet documentation until you see a revision date on the Upgrade Guide after February 15th.
Good stuff, Kevin!
For the most part, the guide is perfect and covers the necessary parts.
Would be good to get rid of those pesky "copy+paste"-errors. I noticed that the guide twice refers a wrong menu item.
1. Open the Data upgrade checklist for in-place upgrade by clicking System administration > Microsoft Outlook synchronization > Checklists > Data upgrade checklist for in-place upgrade.
2013-02-15 21:53:04Z Importing file 'C:\temp\AX2012R2\Models\Standard\Foundation.axmodel' to the database '192.168.201.4\AXDEV1R2_model'.
2013-02-15 21:53:04Z Importing file 'C:\temp\AX2012R2\Models\Labels\FoundationLabels.axmodel' to the database '192.168.201.4\AXDEV1R2_model'.
2013-02-15 21:53:04Z Model 'Foundation' will be replaced.
2013-02-15 21:53:04Z Model '' will be replaced.
2013-02-15 21:53:04Z Model 'Foundation Labels' will be replaced.
2013-02-15 22:54:04Z One or more model elements in the imported model file contains
2013-02-15 22:54:04Z elements that have a different name in the model store. The following elements
2013-02-15 22:54:04Z have been renamed during import:
2013-02-15 22:54:05Z One or more model elements in the imported model file contains
2013-02-15 22:54:05Z elements that have a different name in the model store. The following elements
2013-02-15 22:54:05Z have been renamed during import:
2013-02-15 22:54:05Z An item with the same key has already been added.
2013-02-15 22:54:05Z Setup could not complete the installation.
2013-02-15 22:54:05Z ******************************************************************************************************
2013-02-15 22:54:05Z Component installation task stopped due to an error.
2013-02-15 22:54:08Z S260Finishe
Great, did by the book and the first part fails - db split
When we get decent tools and information to made these upgrades?
What you are seeing with the "item with the same key has already been added" error is one that we have seen a few times in support that we are trying to track down. The error comes down to having a duplicate Object ID between what is in your original model store and the new objects coming in with the 6.2 code. To work through this, until we can find out an exact series of steps that we can use repeatedly, we would need to have you open a support request to have us help you figure out how to get around your conflict. We are actively working on trying to get to the bottom of it as soon as we can, and I will post an update here as well when we have more details or advice on how to proceed.
Thanks for your reply. I'll guess i had to do something with the isv and other custom layers. These error messages should have more information. It is very hard to track down the actual problem.
In the guide the part where upgraded isv models are imported. Why it is needed to import them with /replace switch (i understand that id must be preserved)? As i have understood model import will preserve existing id's if the object already exists in the destination modelstore.
I still have problems getting the CU3 to R2 data upgrade. Below are the steps which we followed
We already have code upgrade done from CU3 to R2. We only have to do data upgrade from CU3 to R2.
Below are the steps we followed
AX2012 CU3 database
1. Deleted all Foundation upgrade objects and then synchronized the database. No syc errors.
2. No modifications to the core system classes (Application, Global, Info, Session)
3. None of batch jobs are in Waiting status
4. Took the DB backup
AX2012 R2 machine
1. Have restored the above CU3 database and provided full access to the current user to the DB
2. Client, debugger and AOS are already installed
3. Uninstalled the existing R2 AOS
4. Machine have enough space and 8 GB RAM
5. Have Exported the model store from R2 model database for already upgraded code from CU3 to R2 (this backup is taken from a different machine)
6. Run the AX2012 R2 setup and choose Database as the only option on the setup window. Choose to Configure an existing database and picked the
existing server and database(CU3 DB), and then choose to import the upgraded R2 model store(exported above).
7. After the database setup finishes, we saw model DB created successfully without any errors
8. Opend a command prompt where your AXUTIL.EXE is, and type in the command
axutil set /installmode
9. Then installed the AX2012 R2 AOS only connecting to the above DB(data and model) and waited for the AOS to restart.
10. After AOS restarted, when trying to connect to AX getting lot of errors with sync issues as below
SQL error description: [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid column name 'PARTITION'.
SQL statement: SELECT
There is also an error which says User doesn't have access to table 'SYSCONFIG'. User is not authorized to perform delete action on table SYSConfig.
Current user is a sys admin on the machine and also have full access to both the above DB's.
Please let me know if i am missing something.
Make sure you set the installmode on the correct modelstore before installing the AOS. Use the explicit parameter S for server/instance and DB for modelstore databae name (ie DynamicsAxDatabase_model). If you are using the wrong version of AxUtil it might set the installmode on the modelstore still located in your RTM business database.
Thanks for your quick response. Yes i have set the correct model store database and server parameter while running the installmode, but still i am getting those errors.
Do you see anything i am doing wrong in the steps i followed?
This thread is being continued as a different community posting - community.dynamics.com/.../102188.aspx
We have done more research on the "Item with the same key has already been added error" and will have a hotfix available in the near future which will address the issue. A couple of the known scenarios that cause this are if an original Dynamics AX class method which started in the FPK layer has been customized in two higher layers and the original Dynamics method is deleted from Dynamics AX 2012 R2 and also a scenario where Form controls have been added/customized on an original Dynamics form in the FPK layer where the form was deleted from Dynamics AX 2012 R2. There are likely others, but the goal of the hotfix is to handle all cases related to the error. I will post a notice of the hotfix when it becomes available.
For your /replace question - we use the /replace as part of the AXUTIL command for installing the new models in order to do the import and removal of the original models (since we are changing layers and models with the R2 release) all within the same step of the process, which also allows us to try and maintain the element handles and object IDs to match the customer's installed environment.
Before you import your VAR layer model, you should allow the AX client to open and launch into the code upgrade checklist so that it can perform all of the steps listed under the Upgrade preparation section of the checklist, which includes a Synchronize of the dictionary. You should follow through the upgrade guide instructions except that instead of doing a code upgrade project you can exit out and import your model at that point.
When you run the upgrade of PROD, make sure you upgrade both the database, AOS and client to R2 in one operation. The next thing you do is do the kernel compile. The guide does not say so, but without the kernel compile at this point, it just won't work. You also need to make sure batch jobs are set to withhold (status = 0) and batch configurations needs to be set to the correct AOS instance. You need these to be ok before you initiate the data upgrade jobs.
A hotfix has been released for the Item with the same key has already been added message during R2 database setup. Details on how to obtain and install the hotfix can be found here: