·
5 min read

Microsoft Dynamics AX 2012 Upgrade – Using the State Transfer Tool

Using the upgrade state transfer tool

The upgrade checklist items for preparing data and preprocessing data are designed to run in the live production system, but some users will want a different option in order to prevent any additional pressure being placed on the production system. Additionally, users may want to gain extra benefit from their test runs to capture all of the data entered from forms found under the Prepare application data for preprocessing and take advantage of the test runs for the jobs under Preprocess data on the live system.

The upgrade utility ships with a set of routines that allows all of the extra data created through the preparation and preprocessing steps to be transferred back into a database that has never run these steps. Instructions for using this process are listed in great detail in the Microsoft Dynamics AX 2012 Upgrade Guide, but will not be used in the course.


 Critical:

In order to use the Upgrade state transfer tool, the decision to use the tool must be made BEFORE doing any of the data preparation or preprocessing steps in the live production database. If any of these steps have already been started in the live production system, the upgrade state transfer tool cannot be used.

 

To find out how to use the upgrade state transfer tool, see Using the preprocessing upgrade state transfer tool or obtain the Microsoft Dynamics AX 2012 Upgrade Guide (http://www.microsoft.com/download/en/details.aspx?id=14599) from the Microsoft Download Center and search in the file for the section titled “Using the pre processing upgrade state transfer tool.” Read through the entire section carefully for detailed information on how to setup the live production system and the test system to support running this process.


 Critical:

We currently are missing an two important steps from our documentation about using the State Transfer tool. First we did not give much explanation for a step to run on the live production system while preparing the database – listed as  “Enable triggers necessary to track data”. Second, the steps for Performing Post-processing tasks is missing an item describing how to move/synchronize two Number Sequences created/modified by the pre-processing and delta scripts which must be manually moved to the production database copy. This will be addressed in a future version of the utility, but not released as a hotfix. The proper steps for setting up the live production system and to oerform post-transfer tasks should be the following:

Prepare the production system – (taken from the upgrade guide linked above)

1. On the production system, import the preprocessing XPO that is appropriate for the Microsoft Dynamics AX version that you are upgrading. For more information, see Install upgrade framework files.

2. On the production system, install the upgrade-related label file (.ald) files. Also install the upgrade-related Help files (.chm) files. For more information, see Install upgrade framework files.

3. On the Preprocessing upgrade checklist, complete the Check upgrade readiness task and resolve any validation errors. Enable triggers to track necessary data, based on prompts from the upgrade readiness checks

 CRITICAL NOTEif you are upgrading from Microsoft Dynamics AX 4.0, at this point you need to go to the AOT, navigate to Jobs, and find the Job EnableDatabaseTriggers. Either choose to Edit the job and run it from the editor or just choose to Open the job to allow it to run. This will create database triggers within your SQL database that are used to track activity related to Inventory Dimensions which is required for the delta processing to properly make sure that all inventory data can be upgraded to use Multi-site correctly once it is migrated to Microsoft Dynamics AX 2012. Customers upgrading from Microsoft Dynamics AX 2009 do not need to run this process (and the job does not exist in the UpgradeAX5.xpo file).

 Perform post-transfer tasks

After the state transfer is complete, perform the following tasks.

  1. Open the Preprocessing upgrade checklist and rerun the tasks in the section Prepare application data for preprocessing. This will allow you to make manual adjustments to new data from the delta between production system backup and completion of the state transfer.
  2. The only tables that this tool copies over are those that are imported as part of the preprocessing XPO – hence, no production data is copied over from the test system back into production. As a result, you must manually synchronize the data in two number sequence tables which are found only in the DAT company on the production system, as shown:

Table name

Description

CRM_1

Party numbers

CRM_2

Location numbers

 

  1. To do this, check the next value and maximum value for each of these number sequences in the test environment and transfer those values manually to the corresponding tables in the production environment. Subsequent scripts in the upgrade process that use these number sequences will pick up the correct values when they are executed.
  2. Finally, run the delta preprocessing scripts, and then continue with upgrade preprocessing in single-user mode.

Using the state transfer tool through multiple iterations

 In addition to the steps listed in the Upgrade Guide, there are steps that will allow for multiple iterations of this process to be run between two test environments before a final transfer back to the live production environment. This scenario can be used if the user has very long cycles of time between testing their delta processing and new data is frequently added to the live production system. The steps listed here describe the process and should be used along with the more expanded directions in the upgrade guide:

  1. Install the preprocessing XPO on the Live Environment
  2. Run Upgrade Readiness only and fix all the issues
  3. Once all issues have been fixed, create a clone of the live environment on the 1st Test Box by moving the database and .AODs (if you import the preprocessing XPO into the test environment you will get different object IDs which will cause issues)

This is where the cycling begins:

4.   In the first test environment, run through the prepare data for preprocessing forms and proceed through running the Live Preprocessing tasks.

  • 5.   Create a clone of the Live Environment on the second test box (this clone will have data which exists in production but not in the data upgraded on the first test system)
  • 6.   Run through the state transfer process from the first test box into the second test box
  • 7.   Perform the post-transfer tasks as listed here in this blog so the number sequence values get transferred.
  • 8.   Run through Delta Preprocessing
  • 9.   Once delta preprocessing has completed, you can repeat these steps (5 to 8) by creating another copy of the live environment into the first test box and transferring data from the second box to the first one.
  • 10.   After a few iterations and once delta preprocessing has reached an acceptable performance threshold, you can use the state transfer tool to move data back into the live production system, go into Single User Mode and finish the preprocessing steps.

This approach minimizes the churn on the live system by only transferring data back to the production database once, after delta preprocessing has reached an acceptable run time.

The following illustration shows the workflow for using the state transfer tool in this iterative cycle.