Migrate to Business Central Cloud
I just recently upgraded my first customer from an on prem installation to the Business Central cloud, and what a ride ??
So I thought that I would share my experiences and how I managed to get by data migrated, first off I would like to point out, that the way that I will cover in this post was the way that succeed for me and not necessarily the correct way. On another note I would like to give a shout out to my talented colleague Iheb Mahmoudi who helped guide my hand though most of the process ??
Pre conditions:
Before you can migrate your data to the cloud, you must upgrade your NAV/BC to BC15, now I would recommend that you upgrade everything in the old fashion way until you get to BC14, when you are on a BC14 you must move all your customizations and data to extensions, and then delete all objects (not standard tables) and put a stanard NAV Cronus package on top, once you have done this and everything still works as intended you are ready to upgrade to BC15.
Step 1:
Un publish and uninstall all extensions from your BC14 which you can do with this PowerShell command.
Get-NAVAppInfo -ServerInstance {BC13ServerInstance} | % { Uninstall-NAVApp -ServerInstance upgbc13 -Name $_.Name -Version $_.Version } Get-NAVAppInfo -ServerInstance {BC13ServerInstance} | % { Unpublish-NAVApp -ServerInstance upgbc13 -Name $_.Name -Version $_.Version }
Step 2:
Delete all objects except tables.
Step 4:
Start the database conversion which you do with the following PowerShell command
Invoke-NAVApplicationDatabaseConversion -DatabaseServer ].\instance} -DatabaseName {DatabaseName}
Step 5:
Configure the BC15 service tier, which you can do with the following PowerShell
Set-NAVServerConfiguration -ServerInstance {BC15ServerInstance} -KeyName DatabaseName -KeyValue "{Databasename}" Set-NAVServerConfiguration -ServerInstance {BC15ServerInstance} -KeyName "DestinationAppsForMigration" -KeyValue '[{"appId":"63ca2fa4-4f03-4f2b-a480-172fef340d3f", "name":"System Application", "publisher": "Microsoft"},{"appId":"437dbf0e-84ff-417a-965d-ed2bb9650972", "name":"Base Application", "publisher": "Microsoft"}]'
Set-NavServerConfiguration -ServerInstance {BC15ServerInstance} -KeyName "EnableTaskScheduler" -KeyValue false
This will set your service tier to use the new database, and it disables your job ques.
Step 6:
Restart the service tier
Restart-NAVServerInstance -ServerInstance {BC15ServerInstance}
Step 7:
Publish System app, System application and base application
Publish-NAVApp -ServerInstance {BC15ServerInstance} -Path "C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\150\AL Development Environment\System.app" -PackageType SymbolsOnly Publish-NAVApp -ServerInstance {BC15ServerInstance} -Path "Dynamics.365.BC.39040.DK.DVD\Applications\System Application\Source\Microsoft_System Application.app"
Publish-NAVApp -ServerInstance {BC15ServerInstance} -Path "Dynamics.365.BC.39040.DK.DVD\Applications\BaseApp\Source\Microsoft_Base Application.app
Step 8:
Synchronize the extensions
Sync-NAVTenant -ServerInstance {BC15ServerInstance} -Mode Sync Sync-NAVApp -ServerInstance {BC15ServerInstance} -Name "System Application" -Version 15.2.39040.0 Sync-NAVApp -ServerInstance {BC15ServerInstance} -Name "Base Application" -Version 15.2.39040.0
Step 9:
Start Data upgrade
Start-NAVAppDataUpgrade -ServerInstance {BC15ServerInstance} -Name "System Application" -Version 15.2.39040.0
Start-NAVAppDataUpgrade -ServerInstance {BC15ServerInstance} -Name "Base Application" -Version 15.2.39040.0
You are now on a BC15 ?? next step is to migrate data to the cloud, the first thing you have to do is make sure that your SQL server is running in mixed mode and that you have a SQL user with Sysadmin permissions.
Next go to your BC in the cloud and go to assisted setup and start the Set up Cloud Migration.
On the first page you have to accept the license agreement, then press next where you have to choose Dynamics 365 Business Central then press next. On the Next page you must setup your SQL connection, in SQL configuration you must choose SQL server, then enter an SQL connection string which should look something like this:
Server=localhost;Database={Database};User Id={user};Password={password};
And then press next.
This will take you to a page where you will be given a download link for Microsoft Intergration agent and an API key which you have to use when you install the agent.
Once you finish installing the agent, you can complete the setup in BC and your data should start to be migrated.
Errors:
SQL compatibility mode is must be 130 or higher – to solve this run following command on your SQL database :
ALTER DATABASE database_name SET COMPATIBILITY_LEVEL = { 150 | 140 | 130 | 120 | 110 | 100 | 90 }
Your application version is not high enough, now this is a hack but you can open your database go to the table $ndo$dbproperty and change databaseversionno to the desired application no
If you get an error during Data Upgrade try to restart service tier
And that is it, like I wrote this is not necessarily the official way to do your data migration but it is the way that worked for me ??
Microsoft Dynamics Business Central/Nav (Functional and Technical). Microsoft Dynamics GP (Functional and Technical). Certified Public Accountant (CPA).
5 年How was it???. Was it smooth or rough???. Am anxious.
Great guide Dennis, but? be aware that Microsoft now is opening up for migrating directly from v14 to the cloud, avoiding the v15, v16 steps?https://docs.microsoft.com/en-us/dynamics365-release-plan/2020wave1/dynamics365-business-central/migrate-data-business-central-14.x-on-premises-business-central-15.x-online