Don’t attempt technical shortcuts when working with Dynamics AX 2012
Posted on: July 18, 2016 | By: Jarrod Kraemer | Microsoft Dynamics AX/365
Authored by: Craig Leska – Senior Technical Consultant
When working with Dynamics AX we want things to move at lightning speed and it is tempting to take shortcuts to make that happen. I have learned over the years that there are no shortcuts when it comes to working with Dynamics AX. When you are developing or importing a model in we all want compile time to be quick and database synchronizations to be speedy. There are ways to cheat and compile the objects we moved in and do a synch on a few tables. Unfortunately you may get mixed results if you attempt that.
If you are running AX 2012 R2 CU7 or above you should be using the AxBuild utility when compiling, this features a multithreaded compiler and when kicked off you can do a full compile of the X++ code in roughly 30 minutes or less, depending on the number of CPUs and memory you have to work with. If you are running CU6 or less, this is a good reason on why to upgrade.
After the compile you may need to synchronize the database if any changes have taken place in the data dictionary, which can take another 20 to 30 minutes and finally a full CIL generation should also done. Total time is all roughly 90 minutes in all.
Prior to CU7, compiles were very painful and often taking six hours or longer to complete and generally done overnight and hopefully things completed with no errors or your AOS crashing.
Running a multithreaded compile is done on the AOS from an elevated command prompt under the path C:Program FilesMicrosoft Dynamics AX60Server
The /s=01 switch would be dependent on what instance you are connecting to, by default with only one instance is it labeled 01.
Tip: You will want to restart the AOS server you run the compile on to refresh all metadata and clear any cache. If you have multiple AOS servers it is best to bring all down except the one you are running the compile on.
As you can see below, a full compile took only 23 minutes on my demo system. Long are the days of 6 plus hour compile times:
Always review the AxcompileAll.html file in the directory C:Program FilesMicrosoft Dynamics AX60Server
Taking the time to do things right will save you time in the long run and leave you with a healthy system. Avoid shortcuts when working with AX.
For additional information please feel free to reach out to us at info@loganconsulting.com or (312) 345-8817.
All the best!
Logan Consulting
www.loganconsulting.com