Wednesday, June 22, 2011

Dynamics AX 2012 Upgrade thoughts

I've been working on upgrading a demo environment of AX 2009 to AX 2012 to get the experience under my belt.  Like any good upgrade, it takes careful planning and execution to be performed properly.  I'll be blogging my adventures through this upgrade as I go, so check back for additional posts.

I have a good deal of AX 4.0 to AX 2009 upgrade experience and AX 2012 upgrade is definitely different.  From AX 4.0 to AX 2009, you basically did three things (not exactly this order):
  • Merged all of your customizations against the new sys/syp layers
  • Extended the ReleaseUpdateDB41* classes if needed to upgrade data
  • Ran the upgrade scripts to upgrade fields and move data around

With AX 2012, there are much more pre-upgrade validation steps where your business data is prepped and validated more closely.  This can make more up-front work, but ideally it will be a more seamless upgrade.  The downside is that it is much more of a team effort initially to upgrade, involving financial decision makers in your organization and a few developers.  I do see the benefit of reducing the potential for error.  The upgrade to 2009 did more blind, data dumping, while 2012 validates/examines what its doing.

I've been working for about 6 hours now hitting a few bumps, mainly because I don't have the answers to some of the financial bits of the upgrade.  Some helpful upgrade whitepapers that were recommended to me can be found here.  My environment is Microsoft's Refresh 3.5 with no layers other than SYS/SYP and a dash of USR.  I just added a couple modifications to see how the new process would work.  The demo data however is not perfect, and because it's a demo company, a good deal of the business inputs required for the upgrade will be guesses by me.

The first steps of the upgrade have you import a giant XPO (9.43 MB) into the USR layer that prepares the system for upgrade.  The first step is a "Check upgrade readiness", which is essentially a bunch of batch jobs that do all sorts of validation on your system.  I had 1228/1229 complete with one erroring.  The results of the completed jobs seemed a little daunting.  Be prepared to have your controller handy.

This step is not required, but let's face it...if you don't get past most of this stuff, it's almost guaranteed you will face issues down the road.  The issues it brings up are for the most part, legitimate issues with data that do need to be fixed.  I chose to ignore most of the errors as I didn't want to spend a long time guessing my way through fixing them, when I don't really know the answers.

The next step "Initialize preprocessing", I think just creates or fills these "Shadow_*" tables in the AOT used to store upgrade data.

Then you have 22 steps to complete, with varying difficulty.  Some of these steps seem like they could have had a "best guess" option.  For example, I had to setup country/region code mapping.  AX 2009 was on ISO 3166-1 alpha-2, and AX 2012 is going to be on ISO 3166-1 alpha-3.  Meaning 2 letter country codes to 3 letter country codes.  This seems like something that can auto-populate.  You also must configure it for each company.  For me, this was 54 country codes such as "US" that I had to map to "USA" across each company.  Just a little time consuming.  Better safe than sorry though.

Other parts of the upgrade require the DAT company to have a number sequence, ledger account, and other small bits of data filled in to proceed.

The errors can seem cryptic, and if you have any bad data in your system, the errors will easily lead you astray.  They are pretty easy to determine via code and the debugger what is causing an error to be thrown.  For example, the demo data had some strange unit conversions for a specific item in one of the companies setup.  The company had 0 items, so the conversions were just bad data.  The errors were just catch-all type messages.  Some quick debugging and it was pretty easy to track down.

I've put in a few long nights after work, so I'm taking breaks in between so I don't wear myself out.  My next steps are:

  • Preprocess data on live system
    • Run live preprocessing scripts
    • Country/region upgrade
    • Run delta preprocessing scripts
  • Preprocess data in single user mode
    • Enter into single-user mode
    • Run single-user mode preprocessing scripts
The single user mode stuff I believe basically bulk copies the prepared data from AX 2009 to the AX 2012 system and finalizes it.

The perk of this is supposed to be a shorter downtime to actually go live.  Stay tuned!