Skip to main content

MSDYN365BC - Data Upgrade To Microsoft Dynamics 365 Business Central on premises.

Hi Readers,

We have already talked about the number of steps for upgrading to Business Central on Premises from different NAV versions.

After that article, I received multiple requests for an article which list down steps for Data Migration. In this article, we will discuss steps of data migration to MSDYN365BC (on-Prem) from NAV 2017.

For this article, I am considering a Cronus Demo Database without any customization. For an actual upgrade project, we will have to complete object merge using compare and Merge process.

After the Merge Process, the next step is data migration. Let's discuss those steps.

Direct Upgrade to Microsoft Dynamics 365 Business Central (on-Prem) is from following versions -
1. NAV 2015.
2. NAV 2016.
3. NAV 2017.
4. NAV 2018.

Step 1 -  Full SQL Database backup of Old Database.
Create a full backup of the old database in the SQL Server. Alternatively, you can make a copy of the old database and perform the upgrade tasks on the copy.

Step 2 -  Uninstall all extensions in the old database. (Applies for NAV 2016 or Higher)

To get a list of the extensions that are installed, run this command:
Get-NAVAppInfo -ServerInstance <ServerInstanceName> -Tenant default

For each extension, run this command to uninstall it:
Uninstall-NAVApp -ServerInstance <ServerInstanceName> -Name <Name> -Version <N.N.N.N>


Remove them all at once, you can run this command:

Get-NAVAppInfo -ServerInstance <ServerInstanceName> -Tenant default | % { Uninstall-NAVApp -ServerInstance <ServerInstanceName> -Name $_.Name -Version $_.Version }

Replace <ServerInstanceName> with the name of the Dynamics NAV Server instance that the database connects to.

Step 3 -  Upload the Business Central partner license to the old database

Step 4 - Delete all objects except tables from the old database.
In the development environment version that matches the database, open the old database, open Object Designer, select all objects except tables, and then choose Delete.
  • Select All from object designer and mark all. (Edit - Toggle Mark).
  • Select Tables from Object designer and remove mark (Edit - Toggle Mark).
  • Select All and Marked only. (View - Marked only).

Step 5 - Clear server instance and debugger breakpoint records from the old database.
DELETE FROM [<My NAV Database Name>].[dbo].[Server Instance]
DELETE from [<My NAV Database Name>].[dbo].[Debugger Breakpoint]

Step 6 - Convert the old database to the Business Central format.
Setup user permission as db_owner in SQL Server as shown below.

Run Business central development Environment (#MSDYN365BC) as administrator. Open Database with Business Central Executable. Do not run schema synchronization at this time. Choose to run it later. 

Step 7 - Import the upgraded application objects.
Using Dynamics NAV Development Environment for Business Central, import the application objects that you want in the database. (Result of Object Merge).

Select Ok to open the import worksheet.
Select Replace All.
Select Schema Synchronization to Later.

Using Dynamics NAV Development Environment for Business Central, import appropriate Upgrade Codeunit. (From Product DVD)

Select Ok to open the import worksheet.
Select Replace All.
Select Schema Synchronization to Later.

Step 8 - Connect a Business Central Server instance to the converted database.
Map to a NAV Service Tier or use Set-NAVServerConfiguration cmdlet in the Business Central Administration Shell to connect a Business Central Server instance to the converted database.

The service account that is used by the Business Central Server instance must be a member of the db_owner role in the Business Central database on SQL Server or Azure SQL Database.

When upgrading a large database, you should increase the SQL Command Timeout setting for the Business Central Server instance, to avoid timeouts during schema synchronization. The default setting is 30 minutes.

Step 9 - Compile all objects
Use the Dynamics NAV Development Environment or finsql.exe to compile all objects. 
This includes the imported application objects, data tables, and system tables. 
Choose to run schema synchronization later. 

Step 10 - Delete Objects, no longer Required.
If you get errors on the following table objects, use the Object Designer to delete the objects because they are no longer used. (Applies for NAV 2015 & NAV 2016 Only)

Table Filter - 470|824|825|827|828|829|1510

When you delete a table object, in the Delete confirmation dialog box that appears, set the Synchronize Schema option to Force.

Step 11 - Increase the application version of the database (Applies if Upgrading from NAV 2018)

If you are upgrading from Microsoft Dynamics NAV 2018, you must increase the application version that is assigned to the database.

Use the Set-NAVApplication cmdlet of the Business Central Administration Shell to increase the application version number of the database from its current version.

To see the current version, use the following command:
Get-NAVApplication -ServerInstance <ServerInstanceName> 

To change the version, use the following command:
Set-NAVApplication -ServerInstance <ServerInstanceName> -ApplicationVersion <N.N.N.N> -Force

For example, if the old version was 11.0.24279.0, then you could change the version to 13.0.24279.0.

Step 12 - Run the schema synchronization on the imported objects
Run - Sync-NAVTenant -ServerInstance <ServerInstanceName>

Step 13 - Run the data upgrade process
A data upgrade runs the upgrade toolkit objects, such as upgrade codeunits and upgrades tables, to migrate business data from the old table structure to the new table structure. 
You can start the data upgrade from the Dynamics NAV Development Environment or Business Central Administration Shell.

Step 14 - Import upgraded permission sets and permissions

Import the permission sets and permissions XML files that you exported from the old database as follows:
1. Delete all permission sets in the database except the SUPER permission set.
2. In Object Designer, run page 9802 Permission Sets, and then delete the permission sets except for SUPER.
3. Run XMLport 9171 and XMLport 9172 to import the permission sets and permission XML files.

Step 15 - Configure pages and reports included in the MenuSuite to be searchable in the Web client.
The MenuSuite is no longer used to control whether a page or report can be found in the search feature of the Web client. This is now determined by specific properties on the page and report objects. 
(I will publish a separate article for this step and how to process it).

Step 16 - Delete the upgrade objects
At this point, you have upgraded the database to Business Central. Now, you can delete the upgrade codeunits and upgrade table objects that you imported in task 9. This task is recommended but not required. 
When you delete tables, on the Delete dialog box, set the Synchronize Schema option to Force.

Filter Objects with Version Tag - @*UPG* 
Delete all objects in the filter with the Sync Schema Force.

With these steps, data migration is over. Next step is to install new extensions and Enable loading application symbol references at server startup. These symbols will be used to connect to AL Environment.

Hope you like this article and it helps you in upgrading data to Business Central.

Saurav Dhyani


  1. Thanks, Saurav! Very helpful, as usual.

  2. I am trying to upgrade a NAV2016 Cum 3 database to 365BC Spring Cum 4 database.

    I follow the MS description & your blog explanation as found here,

    Everything works fine until Task 12, Synchronization. It runs for a short while and then ends with the following error:
    "Sync-NAVTenant : A dead connection cannot be brought back to the livings"

    Database size is 85GB. It should not be a SQL command timeout because I was increased it.

    I have tried the process on four different machines and get the same result. Using SQL Server 2014.

    The NAV2016 database works fine and operational. I can compile all objects and synchronize before I start the upgrade.
    Do you have any ideas?

    1. Thats New @Malith Radrigo,

      Two things i will suggest -
      1. Use Commit per table and then check can you replicate issue. (may have to run sync tenant multiple times).
      2. Try Running Debugger before starting Sync Process and see if it stops in a point of code.

    2. Is this command appropriate to run the commit per table?
      'Sync-NAVTenant -ServerInstance BC140 -CommitPerTable'

    3. Hi @Malith,
      Yes its ok.
      What commit per table does is after one table sync happens in sql it commits that transaction. So if it breaks after 150 tables next time you run sync it will start with table number 151.

  3. Hi Saurav,

    I converted a NAV 2015 db to BC following your steps.
    But I did not run the data upgrade process. Can it happen any issues?


    1. Hi @Madhawa,
      I dont think so but i dont understand reason behind doing this?

    2. Hi Saurav,

      After the upgrade the consumption posting is very slow.
      if any reason for this?


    3. If its only Consumption you can drill down more to identify where the problem is.
      As code base is of 2015 it should work same as before upgrade.

  4. Hi Saurav,

    I did an upgrade from NAV2015 to BC following your steps.
    But I did not run the data upgrade process. Can it happen any issue from this?


    1. Not exactly. Currently you are using BC Executable with NAV 2015 code. Its called as Technical conversion / Platform upgrade.
      But in your next upgrade you will have to do a migration from NAV 2015 to future. Your data still have schema of NAV 2015.

  5. Hi Saurav,

    After the upgrade, sometimes consumption posting is very slow. Then the other users can't post that item led. Entry table is locked. If you have any idea?


  6. Hi saurav, after launching sync process, it hangs on table 957 and this step alone increases the size of database log by the size of 60Go.
    i don't know what the problem is?
    thank for you precious help
    The upgrade is from 2016 to BC140.

  7. Hi Saurav really your Publish Post are Positive Value in word Business central Like author autor , so i have one question because moving from BC130 to BC190 the Latest Build , how can upgrade juste data and running with basic , all standard extension , after i publish my Customization Apps (its BC140 turn into BC190) .
    Can you Give me all script or Steps for

    Thank you

    1. Hi karimo,
      Thanks for the comment.
      Can you please explain the issues via email -

  8. Really helpful :) Thanks for updating......


Post a Comment

Popular posts from this blog

VIEW SERVER STATE permission on SQL Server?

Hi all, Sometime While trying to Login into a database we face an error message as shown below. --------------------------- Microsoft Dynamics NAV Classic --------------------------- You cannot start Microsoft Dynamics NAV Classic because you do not have the VIEW SERVER STATE permission on SQL Server. Contact your system administrator. --------------------------- OK    ---------------------------

NAV 2013 R2 - Cumulative update 12 Released.

Hi all, Please find below the details of  Cumulative Update 12 released for Microsoft Dynamics NAV 2013 R2. Title - Cumulative Update 12 for Microsoft Dynamics NAV 2013 R2 Build No. - 38053 Release Date - October, 2014 Local Version Included - AU, AT, BE, CH, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, SE, UK, RU Download Link Note: Implementing this cumulative update will require a database conversion unless you have already implemented update rollup 5.

NAV 2013 Upgrade Part III - Data Upgrading.

Hi all, As per agenda we need to discuss the data upgrade in NAV 2013. The process is similar to what used to be till NAV 2009 R2 but with some changes. Let's start the process. Remember -  1) You can only upgrade a database to NAV 2013 from NAV 2009 SP1 / R2 SQL Only. 2) The Synchronization of users with SQL Server is no more required.