Skip to main content

Notifications

Path to One Version: Upgrading Dynamics 365 Finance and Operations On-premises data

What is needed: Access to LCS, one-box dev VM, On-premises database backup that needs to be upgraded. In this scenario I will walk through the process of upgrading 10.0.4 VHD to 10.0.5 PU29 and running code and data upgrade from 7.3PU 12 to 10.0.5PU29. Before you begin always check for the updated instructions on docs.microsoft.com. The process of upgrading to the latest version is described here: https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/migration-upgrade/upgrade-data-to-latest-update

This is high level overview of the activities involved in the process:

  1. Configure VM
  2. Update 10.0.4 VM to 10.0.5
  3. Run LCS code upgrade
  4. Restore 7.3 source AXDB on dev VM
  5. Run data upgrade 

Configure VM

Prior to proceeding, the dev VM VHD must already be downloaded from LCS and set up locally. In order to configure the new VM properly, use the following document before the machine is renamed https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/migration-upgrade/vso-machine-renaming

First step is to apply application/platform update. https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/migration-upgrade/vso-machine-renaming#additional-steps-to-install-one-version-service-updates 

Note: Application/Platform update might fail if you don’t update MR settings: https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/migration-upgrade/vso-machine-renaming#update-financial-reporting

PS C:\D365Upgrade\PlatformUpdate\MROneBox\Scripts\Update> .\ConfigureMRDatabase.ps1 -NewAosDatabaseName AxDB -NewAosDatabaseServerName  -NewMRDatabaseName ManagementReporter -NewAxAdminUserPassword AOSWebSite@123 -NewMRAdminUserName MRUser -NewMRAdminUserPassword MRWebSite@123 -NewMRRuntimeUserName MRUSer -NewMRRuntimeUserPassword MRWebSite@123 -NewAxMRRuntimeUserName MRUser -NewAxMRRuntimeUserPassword MRWebSite@123

Update 10.0.4 VM to 10.0.5

First things first: Download the target application/platform update to the local vm and follow the process described in https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/deployment/install-deployable-package.

Note: Make sure you close Visual Studio instances before proceeding with application or platform updates.

Main steps:

  • Run AXUpdateInstaller.exe list

7762.pastedimage1574452807033v2.png

  • Update DefaultTopologyData.xml with the machine name (see configure vm section), update the list of services. Should look something like this (where localhost is your VM name):

8625.pastedimage1574452825164v3.png

  • Generate the runbook

AXUpdateInstaller.exe generate -runbookid="applicationUpdate" -topologyfile="DefaultTopologyData.xml" -servicemodelfile="DefaultServiceModelData.xml" -runbookfile="applicationUpdate.xml"

  • Import the runbook file

AXUpdateInstaller.exe import -runbookfile="applicationUpdate.xml"

  • Verify the runbook

AXUpdateInstaller.exe list

  • Execute the runbook

AXUpdateInstaller.exe execute -runbookid="applicationUpdate"

  • Rerun steps if  the runbook execution fails. 

Run LCS Code Upgrade

Double check that the upgrade services are configured by following the process documented here https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/lifecycle-services/configure-execute-code-upgrade 

  • Create ax7version

7245.pastedimage1574452928030v4.png

  • Execute code upgrade

0218.pastedimage1574452949229v6.png

  • Click Analyze code
  • When complete you will be able to view the results

1881.pastedimage1574452966222v7.png

  • New branch will be created. And this is what we need for the next step.

 3122.pastedimage1574452975842v8.png

  • Next step would be to start visual studio on the local VM, map the workspace to a newly created branch and build the application.

Restore Source database on VM

https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/database/dbmovement-scenario-exportuat

The next step is to restore Source AXDB on VM:

  • Stop the W3SVC, MR2012ProcessServie, DynamicsAXBatch

net stop W3SVC
net stop MR2012ProcessService
net stop DynamicsAxBatch

  • Rename current AXDB (I used AXDB_orig)

 pastedimage1574458877141v1.png

pastedimage1574470901332v3.png

After you run the SQL against imported database your AXDB users will look like the following:

8284.pastedimage1574453121242v11.png

 6266.pastedimage1574453142414v12.png

At this point AXDB is ready for data upgrade package execution 

Run data upgrade package

Download and unzip data upgrade package from LCS

pastedimage1574459887037v1.png

Extract the files. In the folder where you extracted the deployable package, open DefaultTopologyData.xml and repeat the steps for deploy application update using runbook:

  •  Update DefaultTopologyData.xml with the machine name (see configure vm section), update the list of services. Should look something like this (where localhost is your VM name):

8206.pastedimage1574453258534v15.png

  • Generate the runbook

AXUpdateInstaller.exe generate -runbookid="DataUpgrade" -topologyfile="DefaultTopologyData.xml" -servicemodelfile="DefaultServiceModelData.xml" -runbookfile="DataUpgrade.xml"

  • Import the runbook file

AXUpdateInstaller.exe import -runbookfile="DataUpgrade.xml"

  • Verify the runbook

AXUpdateInstaller.exe list

  • Execute the runbook

AXUpdateInstaller.exe execute -runbookid="DataUpgrade"

  • Rerun steps if runbook execution fails. 

Once the data upgrade package is executed, start the services:

net start W3SVC
net start MR2012ProcessService
net start DynamicsAxBatch 

Run the Admin Provisioning Tool to provision yourself as a new admin (as users may be different) and begin testing. In the next post we’ll continue the in-place upgrade process to restore the upgraded AXDB on the source environment and deploy new AX application.

Happy upgrades 

Comments

*This post is locked for comments

  • TechMonkey Profile Picture TechMonkey 20
    Posted at
    Overall a really good document. Note that the "generate runbook" line has a stray 'Э' in place of double-quotes. A couple of lazy/further automated tweaks: For the MR DB, auto substitute the hostname like so: ``` .\ConfigureMRDatabase.ps1 -NewAosDatabaseName AxDB -NewAosDatabaseServerName $env:COMPUTERNAME -NewMRDatabaseName ManagementReporter -NewAxAdminUserPassword AOSWebSite@123 -NewMRAdminUserName MRUser -NewMRAdminUserPassword MRWebSite@123 -NewMRRuntimeUserName MRUSer -NewMRRuntimeUserPassword MRWebSite@123 -NewAxMRRuntimeUserName MRUser -NewAxMRRuntimeUserPassword MRWebSite@123 ``` Similarly, the hostname portion of the topology data with something like ``` $TopologyFile = Get-ChildItem .\DefaultTopologyData.xml [XML]$TopologyData = Get-Content $TopologyFile.FullName $TopologyData.TopologyData.MachineList.Machine.Name = $Env:COMPUTERNAME $TopologyData.Save($TopologyFile.FullName) ``` (Apologies on formatting, I'm trying to find what options are available on this forum, will update when I can.
  • TechMonkey Profile Picture TechMonkey 20
    Posted at
    Overall a really good document. Note that the "generate runbook" line has a stray 'Э' in place of double-quotes. A couple of lazy/further automated tweaks: For the MR DB, auto substitute the hostname like so: ``` .\ConfigureMRDatabase.ps1 -NewAosDatabaseName AxDB -NewAosDatabaseServerName $env:COMPUTERNAME -NewMRDatabaseName ManagementReporter -NewAxAdminUserPassword AOSWebSite@123 -NewMRAdminUserName MRUser -NewMRAdminUserPassword MRWebSite@123 -NewMRRuntimeUserName MRUSer -NewMRRuntimeUserPassword MRWebSite@123 -NewAxMRRuntimeUserName MRUser -NewAxMRRuntimeUserPassword MRWebSite@123 ```
  • Eugene Tsuprenko Profile Picture Eugene Tsuprenko
    Posted at
    Great job Eugene! Thanks for putting it together