Jaa


Scenario: Perform in-place upgrade to Microsoft Dynamics AX 2012 R2

An upgrade from Microsoft Dynamics AX 2012 or Microsoft Dynamics AX 2012 Feature Pack to Microsoft Dynamics AX 2012 R2 is classified as an in-place upgrade. This type of upgrade requires no source-to-target workflow of the kind that is used when you upgrade from Microsoft Dynamics AX 4.0 or Microsoft Dynamics AX 2009. Instead, the final upgrade operations are performed directly on the production system. This how-to describes the method that Microsoft recommends for an in-place upgrade to Microsoft Dynamics AX 2012 R2.

The recommended topology for this in-place upgrade scenario requires three Microsoft Dynamics AX systems:

  • Production – Your existing system that you are upgrading.

  • Test – A copy of your production system that is used to upgrade the database architecture, test new components, and test the data upgrade.

  • Development – A copy of your test system where you upgrade your customized code and other metadata.

The following diagram summarizes the workflow across the three systems.

Figure 1. Phases of in-place upgrade.

By upgrading in the recommended manner, you achieve several goals:

  • Your data and customized code are safely backed up at all times.

  • Operations on the production system that cause downtime are kept to a minimum.

  • You avoid potential conflicts of object IDs in your data and customized code.

Huomautus

The supported upgrade path is from Microsoft Dynamics AX 2012 plus cumulative update 3 (CU3) or later, or from Microsoft Dynamics AX 2012 Feature Pack plus cumulative update 3 (CU3) or later, to Microsoft Dynamics AX 2012 R2. We recommend that the production environment be running CU3 before you upgrade to Microsoft Dynamics AX 2012 R2.

Complete the following procedures in the order in which they appear.

Before you begin

Follow these steps before you begin the in-place upgrade process.

  • Freeze development and the application of hotfixes on the production system for at least two weeks prior to copying it to the test system. Track any subsequent changes to the production system and plan to perform a final delta code upgrade after completing the main round of code upgrade on the development system.

  • Delete all earlier upgrade models from all layers of the production environment, and then synchronize the database. Upgrade models contain the word "Upgrade" in their name. For more information, see How to: Remove (Uninstall) a Model.

    Tärkeä

    When you delete upgrade models and synchronize the database, all the DEL_ upgrade tables and fields are removed from the database. If you have a project that you are still upgrading to Microsoft Dynamics AX 2012 or Microsoft Dynamics AX 2012 Feature Pack, complete that project before you upgrade to Microsoft Dynamics AX 2012 R2.

  • Before you make a copy of your production database, so that you can use the copy to create the test environment, make sure that none of your batch jobs are running. Jobs must have the status Withhold or Ended. Batch jobs should not have the status Waiting. For more information, see View or change batch job status.

  • Make sure that the environment where you are performing code upgrade has at least 8 GB of RAM. We strongly recommend that the environment have 16 GB of RAM.

  • If there are any modifications to the core system classes (Application, Global, Info, Session) they should be removed from the system prior to running the Microsoft Dynamics AX 2012 R2 setup steps, and then added back in as part of the code upgrade steps for the layer where the modifications existed previously. Failure to remove these can lead to a state where the AOS will not be able to start or properly upgrade the database and stored procedures to the proper Microsoft Dynamics AX 2012 R2 state.

  • To avoid potential issues with modified classes, uninstall the Data Management Framework models if they are present.

  • Make sure that your production Microsoft Dynamics AX database is in a fully synchronized state. If you removed the upgrade models in a previous step and completed the Model upgrade checklist that appeared after deleting the models, this should not be an issue. However, if there were no upgrade models, you should not run R2 Setup until after you either

    • verify that the AOT and database are properly synchronized, or

    • synchronize the database from the AOT using the existing (pre-R2) client and AOS.

    Failure to do this may cause synchronization issues in the R2 environment and prevent the AOS from starting.

Create test system

Duplicate production system

Figure 2. Create a simplified copy of your production system for testing.

Duplicate your existing production system to create the test system. You can accomplish this by copying a virtual machine image, or, alternatively, you can build a new system by using Setup from your legacy Microsoft Dynamics AX version, and then copying over the production database. For the sake of simplicity, the diagrams depicting the test and development systems in this how-to assume a one-computer system containing the database, a single Application Object Server (AOS) instance, a single client, and the debugger (not shown). However, these procedures also work for multi-computer systems. Regardless of the hardware topology you select, you should make sure that no other Microsoft Dynamics AX components, such as Enterprise Portal, Reporting Services, or Analysis Services, are present on the test system when you run Setup for Microsoft Dynamics AX 2012 R2.

When the test system is ready for upgrade, it contains legacy Microsoft Dynamics AX 2012 or Microsoft Dynamics AX 2012 Feature Pack models and also any customer models.

For tips on copying a Microsoft Dynamics AX system for testing or development purposes, see Moving between Microsoft Dynamics AX 2012 Environments.

Run Microsoft Dynamics AX 2012 R2 Setup on the test system

Huomautus

This procedure assumes knowledge of Microsoft Dynamics AX 2012 R2 installation. For installation guidance, see Install Microsoft Dynamics AX 2012.

Figure 3. Run Setup on the test system to (1) split the database, (2) install the new Microsoft models, and (3) upgrade the AOS and client.

In this procedure you will run Microsoft Dynamics AX 2012 R2 Setup several times on the test system to install updated versions of the AOS, client, and debugger, to install the models required for your deployment, and to restructure the database. It is crucial that you follow the detailed steps presented here, as this installation differs in important ways from other installation scenarios.

In both Microsoft Dynamics AX 2012 and Microsoft Dynamics AX 2012 Feature Pack, a single database contained data and metadata. Beginning with Microsoft Dynamics AX 2012 R2, the model store and business data reside in separate databases in order to simplify maintenance and backups. Setup automatically splits your existing database into the two databases used by Microsoft Dynamics AX 2012 R2.

Prepare the test system as follows:

  • Using Control Panel > Programs and Features, uninstall all of the Microsoft Dynamics AX components except for the AOS instance you will be upgrading.

    Vihje

    We recommend a test-system topology in which the AOS and database are on the same computer. If they are on different computers, the permissions on the two SQL Server databases created during upgrade may not be set correctly. In such a situation, it will be necessary to set the permissions manually using AxUtil grant <arguments>.

  • Make sure that you will be running Setup as a user with full permissions to the database.

  • Make sure you have at least 60GB of free disk space for the installation of temporary files.

Now complete these steps using Microsoft Dynamics AX 2012 R2 Setup.

  1. First, upgrade the database. Start by running Setup on the computer hosting the AOS. Note that no other components will be installed during this run of Setup. Proceed through the Setup wizard to the Select databases page and select Configure existing databases.

  2. On the Connect to the databases page, in the Database name field, select your existing Microsoft Dynamics AX database.

    Huomautus

    The Baseline database name field should be left blank during this procedure.

  3. On the Select additional models page, select the Foundation model, Foundation Upgrade model, and any other models that you require for your deployment. If you are using country-specific/region-specific features, also select the Foundation Labels model.

  4. On the Select file location page, select Specify a temporary file location, and then enter or browse to an appropriate location in which to store the temporary model files and the SQL Server log file. We recommend that you provide 60 GB of disk capacity for this purpose. Make sure that your current administrative user has full access to this storage location.

  5. Confirm your selections, and install the models.

    Huomautus

    After the models are installed, the AOS instance restarts automatically. This restart may take longer than a typical AOS restart. If this process times out and causes an error, restart Setup to continue.

    After this step is completed, the test system contains two databases, one that contains the business data and one that contains the model store. The model store now consists of the following components:

    • Upgraded Microsoft Dynamics AX 2012 R2 models in the SYS, GLS, FPK, and SLN layers

    • Non-upgraded customer models in the ISV, VAR, CUS, and USR layers

  6. To prepare for AOS upgrade, open the Microsoft Dynamics AX 2012 Server Configuration Utility (Start > Administrative Tools > Microsoft Dynamics AX 2012 Server Configuration). Note down the values of the following settings on the Application Object Server tab:

    • TCP/IP port

    • Services WSDL port

    Note down the values of the following settings on the Database Connection tab:

    • Server name

    • Database name

    Keep this information available so that you can provide it to Setup when prompted.

  7. Manually remove the remaining instance of the AOS using Control Panel > Programs and Features.

    Vihje

    If you fail to remove the old AOS manually prior to installing the new Microsoft Dynamics AX 2012 R2 AOS, you may encounter multiple errors in subsequent steps. You can return the system to a stable condition in either of two ways.

    Edit the Windows registry

    If you need to preserve your AOS configuration settings, you can accomplish this by editing the registry. Create a new key “split_modeldb” with value “1” at each of the following registry locations:

    • HKEY_CURRENT_USER\Software\Microsoft\Dynamics\6.0\Configuration

    • HKEY_LOCAL_MACHINE\Software\Microsoft\Dynamics\6.0\Configuration

    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Dynamic Server\6.0\

    • HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\ Dynamic Server\6.0\

    • HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\services\ Dynamic Server\6.0\

    • HKEY_USERS\[your SID]\Software\Microsoft\Dyanmics\6.0\

    Uninstall/reinstall the AOS

    If you are willing to lose your current AOS configuration, you can restore the system relatively simply by performing these steps:

    1. Uninstall the Microsoft Dynamics AX 2012 R2 AOS using Control Panel > Programs and Features.

    2. Using Setup.exe, reinstall the Microsoft Dynamics AX 2012 R2 AOS and configure it to use the upgraded database.

  8. Run Setup and confirm that an upgrade is being performed. On the Add or modify components page, select Application Object Server (AOS). When prompted, provide Setup with the AOS and database configuration values you recorded above.

  9. After the installation is completed, make sure that the AOS starts successfully. If it takes longer than ten minutes, cancel the restart and try again.

  10. Now run Setup a third time on the computer hosting the AOS, as well as on any other computers if you are using a multi-computer configuration. On the Add or modify components page, select and install the following components:

    • Client

    • Debugger

    • Management utilities

After you have successfully split the database, installed the models, and installed the other core components, exit Setup and then follow these steps.

  1. Stop the AOS.

  2. [Applies only to users installing Microsoft Dynamics AX 2012 R2 CU6 during upgrade.] Follow the procedure documented in SQL patch script for Microsoft Dynamics AX 2012 R2 + CU6 upgrade scenarios.

  3. Start the AOS.

  4. Perform a full kernel compilation by using the following command:

    Ax32.exe -startupcmd=kernelcompileall

    Huomautus

    This compilation may take five hours or more. Minimum RAM for performing this operation is 8 GB, though 16 GB or more is recommended.

  5. Manually restart the AOS instance again.

  6. Open the client on each system computer and provide your Microsoft Dynamics AX 2012 R2 license.

Back up the test system model store

Figure 4. Export the model store containing the upgraded Microsoft models to a file.

Create a file backup of the model store. This backup is used during code upgrade of the models in the customer layers.

To export the model store to a file by using AxUtil, use the following command:

AxUtil.exe exportstore /file:[full path of file and file name]

This operation exports the model store as a single file that has the .axmodelstore file-name extension. For more information about how to export and import complete model stores, see How to: Export and Import a Model Store.

Tärkeä

In many cases, you can also use backup and restore operations for Microsoft SQL Server to work with the model store. However, Microsoft Dynamics AX Setup can accept only model store files.

Create development system

Duplicate the test system

Figure 5. Create a copy of your test system for development use.

Duplicate the Microsoft Dynamics AX 2012 R2 test system to create the development system, which is used to upgrade customer models. In its initial state, the development system contains the standard Microsoft models for Microsoft Dynamics AX 2012 R2 and also any customer models that exist on the legacy system.

Prepare for code upgrade by completing the following steps on the newly created development system.

  1. On the computer hosting the AOS, open the server configuration utility (Start > Administrative Tools > Microsoft Dynamics AX 2012 Server Configuration).

  2. Create a new configuration is there is no editable one.

  3. On the Database Connection tab, set the baseline database name to be the same as the database name. This will preserve the pre-R2 model store when Setup splits the original database into separate databases for data and metadata.

  4. Restart the AOS.

  5. Start the client, and synchronize the database from the AOT.

Import ISV-provided models into the development system

If an independent software vendor (ISV) has supplied you with upgraded models that are ready for import, import these models into their layers now. Start at the lowest layer, and work up. Model import must be performed as follows to preserve legacy object IDs.

  1. List the models that are installed, and display their IDs, by using the following command:

    AxUtil.exe list

  2. Import the models, but preserve the legacy IDs, by using the following command:

    AxUtil.exe import /file:[full path of file and file name] /replace:[ID of legacy model]

For more information about how to import a model from a file, see How to: Export and Import a Model.

Upgrade customer models

Assign the working layer on the development system and delete all higher models

Figure 6. Work on one layer at a time and remove the models above it.

Customer models belong to one of the customer layers. In ascending order, these layers include the ISV, VAR, CUS, and USR layers. Code upgrade is performed by layer, meaning that each customer layer is upgraded separately, starting at the lowest layer and working up through the higher layers. The lowest layer is the layer that is closest to the SYS layer. All models in a layer are upgraded as part of code upgrade in that layer. For more information, see Layers.

Tärkeä

For simplicity, Figure 6 does not display patch layers (VAP, CUP, etc.). If there are patches installed on your system, you need to account for them in your plan for code upgrade. You can merge them either prior to upgrade or during the code upgrade process.

As shown in Step 1 in Figure 6, you first determine the lowest non-upgraded customized layer. Use the Microsoft Dynamics AX Configuration Utility to assign this layer as the working layer. Restart the Microsoft Dynamics AX client for this change to take effect. In Figure 6, the VAR layer has been set as the working layer and is shown in yellow. In this example, we assume that the ISV layer has already been upgraded as described in the section “Import ISV-provided models into the development system,” earlier in this how-to. For more information about how to set the working layer, see How to: Set the Layer.

Next, as shown in Step 2, use AxUtil to delete the models in layers that are higher than the lowest non-upgraded customized layer. For more information about how to remove models by using AxUtil, see How to: Remove (Uninstall) a Model.

Upgrade code on the development system and export the upgraded models

Figure 7. Upgrade code and export models.

In Figure 7, the models in the VAR layer are undergoing upgrade. As shown in Step 1, you must complete the tasks on the Code upgrade checklist for in-place upgrade. All tasks on the checklist must be completed for each layer that contains models needing upgrade.

Huomautus

If you plan to compare your pre-upgrade code to your new Microsoft Dynamics AX 2012 R2 code, you must configure a baseline database before you start the checklist. When a baseline database is configured, you can compare differences in code versions between the old Microsoft code, the new Microsoft code, and your old and new customizations. If a baseline database is not configured, you can only compare your old customizations, which were designed against the Microsoft Dynamics AX 2012 R2 or Microsoft Dynamics AX 2012 Feature Pack codebase, to the default Microsoft Dynamics AX 2012 R2 code.

Follow these steps to configure the baseline database:

  1. Close the Microsoft Dynamics AX client.

  2. Open the Microsoft Dynamics AX 2012 Server Configuration utility (Start > Administrative Tools > Microsoft Dynamics AX 2012 Server Configuration).

  3. If there is no editable configuration, create a new one.

  4. On the Database Connection tab, set the Baseline database name value so that it is the same as the Database name value.

  5. Restart AOS.

  6. Reopen the Microsoft Dynamics AX client, and continue with the upgrade.

At any time while you complete the checklist, if you find that you do not have the basis that is required for code comparison, you can stop the client and configure the baseline database by using this procedure.

After the checklist tasks have been completed, export the upgraded models as shown in Step 2 of the diagram above. These models are re-imported during a later procedure. For information about how to export a model to a file, see How to: Export and Import a Model.

The Code upgrade checklist for in-place upgrade contains the following tasks.

Task

Notes

Code upgrade white papers

For information, see the downloadable code upgrade white papers. Additionally, see Inside Microsoft Dynamics AX 2009, Chapter 18: “Code upgrade,” pp. 623–644.

Remove higher model layers

See the section “Assign the working layer on the development system and delete all higher models” in this how-to.

Restart Application Object Server

For information, see Käynnistä Application Object Server uudelleen.

Compile application

For information, see Käännä sovellus.

Compile into .NET Framework CIL

For information, see Käännä .NET Framework -järjestelmän yleiselle välikielelle (CIL).

Provide license information

For information, see Käyttöoikeustietojen määrittäminen.

Synchronize database

For information, see Tietokannan synkronointi.

Set up Application Integration Framework

Services and Application Integration Framework (AIF) require that you register new adapters, services, and basic ports any time that you change the Application Object Tree (AOT). Click this checklist task before you configure integration ports for the first time after upgrade.

This task initializes all services that are available in Microsoft Dynamics AX 2012 R2 and deploys service groups that are automatically deployed. Service groups that are not automatically deployed and enhanced ports can be deployed after this task has run.

Registration of new adapters, services, and ports can take several minutes.

Automatically merge enums

For information, see Yhdistä kantavalintalistat automaattisesti.

Update SSRS project references

Automatically update references for Microsoft SQL Server Reporting Services projects, so that the references compile correctly against the upgraded application. For more information, see Development Tasks for Reporting.

Identify SSRS Reports without a Visual Studio Model Project

Create a Microsoft Visual Studio project that contains all reports that do not have a Visual Studio model project. For more information, see Development Tasks for Reporting.

Compile application

For information, see Käännä sovellus.

Detect code upgrade conflicts

For information, see Koodin päivityksen ristiriitojen tunnistaminen.

Upgrade your metadata

For information, see Metatietojen päivitys.

Restart Application Object Server

For information, see Käynnistä Application Object Server uudelleen.

Compile into .NET Framework CIL

For information, see Käännä .NET Framework -järjestelmän yleiselle välikielelle (CIL).

Export upgraded models

See above in this section and see also Step 2 in Figure 7.

Export upgraded model store

See the section “Back up the upgraded model store” in this how-to.

Import the model store backup to the development system

Figure 8. Import the test-system model store.

After completing upgrade for a layer, you need to manually rebuild the model store and move on to the next layer. On the development system, import the backup of the model store that you made in the procedure “Back up the test system model store.” To complete this task by using AxUtil, use the following command:

AxUtil.exe importstore /file:[full path of file and file name] /idconflict:overwrite

This operation overwrites the upgraded layers, which are the ISV and VAR layers in this example, and also the other layers. Therefore, the upgraded models must be re-imported in the next step.

Varoitus

The /idconflict:overwrite parameter that is used in this operation deviates from best practices and should be used only in the upgrade scenario that is described here. Use of this parameter in other circumstances causes the model store to be corrupted.

Import upgraded models into their layers on the development system

Poista ylemmät kerrokset

Figure 9. Import the upgraded model files.

Import the upgraded model or models into the appropriate customer layers. Start with models from the lowest layer, then work up through the higher layers. In this example, upgraded customer models are being imported into the ISV and VAR layers, in that order. Model import must be performed by using the following command to preserve legacy object IDs:

AxUtil.exe import /file:[full path of file and file name] /replace:[ID of legacy model]

For more information about how to import a model from a file, see How to: Export and Import a Model.

Repeat code upgrade for each layer

Päivitä seuraava alimman kerroksen

Figure 10. Repeat the procedure for all layers requiring upgrade.

For each remaining layer that contains customized models, repeat the upgrade procedure, moving from the lowest remaining layer to the highest layer. As shown in Figure 10, cycle through these steps until the models in all layers have been upgraded:

Step 1: Step Assign the working layer.

Step 2: Delete models in higher layers.

Step 3: Perform the tasks on the code upgrade checklist.

Step 4: Export the upgraded models.

Step 5: Restore the backup of the model store.

Step 6: Import the upgraded models into their respective layers.

Perform code upgrade on the production system delta

During the time that has elapsed since you copied the production system to create the test system, updates and hotfixes may have been applied to the production system. Before completing the development steps, you must export any changed models on the production system and merge their changes into the upgraded model store. This requires that you run an additional code upgrade cycle for each affected layer.

Tärkeä

The production system should remain in a complete code freeze from this point until the completion of the upgrade.

Export the upgraded model store

Vie päivitetty kerrokset

Figure 11. Export the upgraded model store for use on the test and production systems.

Export the fully upgraded model store that you have created on the development system to a file. This file acts as the source of the upgraded customer models that are used to prepare for data upgrade first on the test system and later on the production system.

Before exporting the model store, run the following AxUtil command:

AxUtil.exe set /installmode

Varoitus

If the /installmode flag is not set prior to export, you will not be able to start your Microsoft Dynamics AX 2012 R2 AOS when you attempt data upgrade.

The model store can now be exported using the following command:

AxUtil.exe exportstore /file:[full path of file and file name]

This operation exports the model store as a single file that has the .axmodelstore file name extension. For more information about how to export and import complete model stores, see How to: Export and Import a Model Store.

Test data upgrade

Import the upgraded model store into the test system

Tuo malli store varmuuskopioida uudelleen

Figure 12. Prepare the test system for data upgrade by importing the upgraded model store.

On the test system, import the model store file that you made in the procedure “Export the upgraded model store.” To complete this task by using AxUtil, use the following command:

AxUtil.exe importstore /file:[full path of file and filename] /idconflict:overwrite

For more information about how to export or import a complete model store, see How to: Export and Import a Model Store.

The test system now contains the standard Microsoft Dynamics AX 2012 R2 models, the upgraded customer models, and a snapshot of the business data.

Vihje

We recommend that you create a backup of both Microsoft Dynamics AX databases at this point. If you experience an error during the data upgrade procedure, you must revert to this earlier state, resolve the underlying issue, and try the data upgrade again.

Perform data upgrade on the test system

Päivitetty molemmat kerrokset mallit tuoda uudelleen

Figure 13. Complete the tasks on the data upgrade checklist.

Before beginning data upgrade, set the SQL Server logging model to Simple, and confirm that the AOS is set up as a batch server and that it can process the DataUpgrade batch group.

You can now perform the data upgrade as described in the following steps.

  1. Open the Data upgrade checklist for in-place upgrade by clicking System administration > Setup > Checklists > Data upgrade checklist for in-place upgrade.

  2. Complete the tasks on the checklist. This run-through of data upgrade acts as a test, and also provides a platform for user acceptance testing (UAT) before the production system is upgraded.

The Data upgrade checklist for in-place upgrade contains the following tasks.

Task

Notes

Import upgraded model store

See the section “Restore the upgraded model store to the test system,” earlier in this how-to.

Restart Application Object Server

For information, see Käynnistä Application Object Server uudelleen.

Compile into .NET Framework CIL

For information, see Käännä .NET Framework -järjestelmän yleiselle välikielelle (CIL).

Provide license information

For information, see Käyttöoikeustietojen määrittäminen.

Disable SQL Server change tracking

Turn off change tracking in SQL Server. Database synchronization cannot be completed without errors unless change tracking is disabled.

Huomautus

If the customer requires that change tracking be enabled, you can manually re-enable SQL Server change tracking after data upgrade is completed.

Detect update scripts

After you click this task, you cannot modify your upgrade scripts. If you encounter an error that is caused by an issue in a script or in your data, you must following these steps.

  1. Revert to the state that is described in the previous section, “Restore the upgraded model store to the test system.”

  2. Resolve the issue that is causing the error.

  3. Try to upgrade your data again.

Presynchronize

For information, see Presynchronize (päivitys).

Synchronize database

This initial database synchronization can take up to six times as long as a typical synchronization. For more information, see Tietokannan synkronointi.

Launch data upgrade

For information, see Käynnistää tietojen päivittäminen.

Upgrade additional features

For information, see Lisäominaisuuksien päivittäminen.

Restructure database schema for inherited tables

This task flattens the legacy table hierarchy to improve performance. Follow the steps that are displayed in the Infolog window that the task opens. For more information, see the Upgrade best practices white paper.

Restart Application Object Server

For information, see Käynnistä Application Object Server uudelleen.

Synchronize database

For information, see Tietokannan synkronointi.

Huomautus

Due to a known issue, this checklist step may appear already to be checked as complete. Regardless of its apparent status, the step must be run at this time.

Set up Application Integration Framework

Services and AIF require that you register new adapters, services, and basic ports any time that you change the AOT. Click this checklist task before you configure integration ports for the first time after upgrade

This task initializes all services that are available in Microsoft Dynamics AX 2012 R2 and deploys service groups that are automatically deployed. Service groups that are not automatically deployed and enhanced ports can be deployed after this task has run.

Registration of new adapters, services, and ports can take several minutes.

Upgrade production system

Varoitus

This procedure does not support rollback of an upgrade from the production environment. If you want to be able to roll an upgrade back, we strongly recommend that you install a new production environment, except the database, on different equipment. You can then restore the backup of the model store that you created in the development environment to the production environment, and then proceed with data upgrade.

Back up the database

Back up the production environment database.

Enter single-user mode on the production system

Figure 14. Take the production system out of service in preparation for upgrade.

On the production system, enter single-user model. All client users other than the administrator will be disconnected form the Microsoft Dynamics AX system at this point. This action starts the downtime window during which new business transactions cannot be processed. For more information, see Enter into single-user mode.

Upgrade the core production system

Upgrade on the production system requires that you run Microsoft Dynamics AX 2012 R2 Setup on each computer in your deployment. Components of the deployment must be upgraded in the order that is shown in the following procedures.

Run database setup

Figure 15. Run Setup on the production system to upgrade the database architecture.

As shown in Figure 15, upgrading the production database to Microsoft Dynamics AX 2012 R2 involves three tasks, all of which are carried out through Setup.

Step 1: Designate the existing Microsoft Dynamics AX database as the business data database.

Step 2: Create a new database to contain the model store.

Step 3: Import the backup file containing the upgraded model store into the new database.

Prepare the production system as follows:

  • Using Control Panel > Programs and Features, uninstall all of the Microsoft Dynamics AX components except for the AOS instance you will be upgrading.

  • Make sure that you will be running Setup as a user with full permissions to the database.

  • Make sure you have at least 60GB of free disk space for the installation of temporary files.

Complete the following steps to upgrade the database. It is crucial that you follow the detailed steps presented here, as this installation differs in important ways from other installation scenarios.

  1. Run Microsoft Dynamics AX 2012 R2 Setup on your database server.

  2. On the Add or modify components page, select Databases only.

  3. On the Select databases page, select Configure existing databases.

  4. On the Connect to the databases page, in the Database name field, select your existing Microsoft Dynamics AX database.

    Huomautus

    The Baseline database name field should be ignored during this procedure.

  5. On the Select additional models page, select the Foundation Upgrade model and any other models that you require for your deployment. If you are using country-specific/region-specific features, also select the Foundation Labels model.

    Tärkeä

    If your system has an upgrade model that is left over from a previous upgrade, you must remove that upgrade model. Run the following console command from your server\bin folder:

    AxUtil delete /model:[model id]

  6. On the Select file location page, select Import an upgraded model store file, and then enter or browse to the location of the model store backup that you made in the procedure “Back up the upgraded model store.”

  7. Confirm your selections, and install the model store.

Huomautus

As can be seen in Figure 15, the legacy model store tables persist alongside the business data but are not used. These tables should not be deleted, because they act as an archive of your pre-upgrade code customizations.

Upgrade AOS and other components

Figure 16. Run Setup on the production system to upgrade the core server and client components.

As shown in Figure 16, you now need to run Setup on the computer that hosts the AOS to install (that is, upgrade) the following components:

  • AOS

  • Client

  • Debugger

  • Management utilities

Varoitus

As was true when creating the test system, it is important to remove the legacy AOS before you install the Microsoft Dynamics AX 2012 R2 AOS.

Complete the following steps to upgrade the core components.

  1. To prepare for AOS upgrade, open the Microsoft Dynamics AX 2012 Server Configuration Utility Start > Administrative Tools > Microsoft Dynamics AX 2012 Server Configuration. Note down the values of the following settings on the Application Object Server tab:

    • TCP/IP port

    • Services WSDL port

    Note down the values of the following settings on the Database Connection tab:

    • Server name

    • Database name

    Keep this information available so that you can provide it to Setup when prompted.

  2. Manually remove the remaining instance of the AOS using Control Panel > Programs and Features.

    Vihje

    If you fail to remove the old AOS manually prior to installing the new Microsoft Dynamics AX 2012 R2 AOS, you may encounter multiple errors in subsequent steps. You can return the system to a stable condition in either of two ways.

    Edit the Windows registry

    If you need to preserve your AOS configuration settings, you can accomplish this by editing the registry. Create a new key “split_modeldb” with value “1” at each of the following registry locations:

    • HKEY_CURRENT_USER\Software\Microsoft\Dynamics\6.0\Configuration

    • HKEY_LOCAL_MACHINE\Software\Microsoft\Dynamics\6.0\Configuration

    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Dynamic Server\6.0\

    • HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\ Dynamic Server\6.0\

    • HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\services\ Dynamic Server\6.0\

    • HKEY_USERS\[your SID]\Software\Microsoft\Dyanmics\6.0\

    Uninstall/reinstall the AOS

    If you are willing to lose your current AOS configuration, you can restore the system relatively simply by performing these steps:

    1. Uninstall the Microsoft Dynamics AX 2012 R2 AOS Control Panel > Programs and Features.

    2. Using Setup.exe, reinstall the Microsoft Dynamics AX 2012 R2 AOS and configure it to use the upgraded database.

  3. Run Setup and confirm that an upgrade is being performed. On the Add or modify components page, select Application Object Server (AOS). When prompted, provide Setup with the AOS and database configuration values you recorded above.

  4. When installation is completed, use the Microsoft Dynamics AX 2012 Server Configuration utility to point the AOS instance at the upgraded model store and the business database, which is not yet upgraded.

  5. Use the Microsoft Dynamics AX 2012 Configuration utility to point the client at the new AOS instance.

  6. Run Setup again and install the client, debugger, and management utilities on the AOS computer.

  7. Run Setup on the computer that hosts the Help server. Select Help Server for installation, and also select any non-default languages that you want to install. When installation is completed, supply the AOS instance with the address of the Help server. For more information, see Deployment of the Help server.

Perform data upgrade on the production system

Figure 17. Complete the tasks on the data upgrade checklist.

When you start the client after making changes to the model store, a dialog window titled The model store has been modified. should open automatically. Select Start the data upgrade checklist for in-place upgrade and click OK.

If the model store dialog window does not open automatically, open the Data upgrade checklist for in-place upgrade directly by clicking System administration > Setup > Checklists > Data upgrade checklist for in-place upgrade.

Complete the tasks on the checklist as described earlier in this how-to in the section “Perform data upgrade on the test system.”

Upgrade additional server components

Figure 18. Run Setup on the additional server computers.

When data upgrade is completed, you can complete the upgrade of server components. As shown in Figure 18, run Setup on the computers that host Enterprise Portal for Microsoft Dynamics AX, Reporting Services, and Analysis Services, and select the appropriate component for each. When installation is completed, validate these services against the upgraded Microsoft Dynamics AX data. For more information, see Deploy Enterprise Portal and Role Centers and Deployment of reporting.

Upgrade additional clients

Figure 19. Run Setup on the additional client computers.

As shown in Figure 19, run Setup on your additional Microsoft Dynamics AX client systems to upgrade the client software. Select the following components for installation:

  • Client

  • Management utilities

For large deployments, you may want to perform a silent installation. For more information, see Install Microsoft Dynamics AX in silent mode.

Troubleshoot in-place upgrade

This section describes common issues that you might encounter during in-place upgrade.

The database reported invalid column name 'PARTITIONKEY'

This error occurs when batch jobs are still running against the database that is being upgraded.

Resolution: Stop the batch jobs that are running against the database, and then start the data upgrade process again.

Upgrade is unable to uninstall a component of Microsoft Dynamics AX

This error occurs when the Microsoft Dynamics AX 2012 R2 installer cannot find hotfixes that were applied after the original installation.

Resolution: Uninstall the component by using Control Panel > Add/Remove Programs, and then install the Microsoft Dynamics AX 2012 R2 version of the component.

See also

Back up and recover databases

Drain users from an AOS

Määritä AOS muodostaa yhteyden eri tietokantaan