Share via


Converting a Database - Technical Upgrade - 2017

Applies to: Microsoft Dynamics NAV 2017. See Microsoft Dynamics NAV 2018 version.

This article describes how to convert a Dynamics NAV database from one of the following versions to Microsoft Dynamics NAV 2017:

  • Microsoft Dynamics NAV 2013
  • Microsoft Dynamics NAV 2013 R2
  • Microsoft Dynamics NAV 2015
  • Microsoft Dynamics NAV 2016
  • Microsoft Dynamics NAV 2017 (cumulative update)

About database conversion

Converting a database, which is often referred to as a technical upgrade, changes the database so that it works on the new Microsoft Dynamics NAV 2017 platform. The conversion updates the system tables of the old database to the new schema (data structure), and upgrades of all reports to support Report Viewer 2015. It provides you with the latest platform features and performance enhancements.

Prepare Microsoft Dynamics 365 for Sales integration code for upgrade

If your solution integrates with Microsoft Dynamics 365 for Sales, and you're upgrading to Dynamics NAV cumulative update 41 (Build 47056) or later, you'll have modify some code before you upgrade. For more information, see Modifying Dynamics 365 Sales Code for Technical Upgrade to Dynamics NAV 2017.

Task 1: Preparing the Old Database

To convert the old database to a Microsoft Dynamics NAV 2017 database, the first task is to back up the old database and then prepare to convert it.

Note

Do not perform this task if you are converting the database from one cumulative update of Microsoft Dynamics NAV 2017 to the next cumulative update. In this case, you only have to complete task 2.

To prepare the old database

  1. Make a copy of the old database or create full database backup.

    For more information, see Create a Full Database Backup (SQL Server).

  2. Open the development environment that matches the Dynamics NAV version of the old database, and then connect to the old database.

    For more information, see How to: Open Databases.

  3. In Object Designer, verify that no objects are locked.

    If one or more objects are locked, the conversion process cannot update the database version number. As a result, the conversion does not complete.

  4. On the Tools menu, choose Build Server Application Objects, and then choose the Yes button.

    Note

    This step does not compile objects in the old database that have not been compiled before.

  5. If any errors occur, they are shown in the Error List window. Make sure that you address all compilation errors before you continue.

  6. Upload the Microsoft Dynamics NAV 2017 Partner license to the database

    For more information, see Uploading a License File for a Specific Database.

    Important

    The license that you upload must be a developer license. During the conversion, the development environment will convert the report objects that are stored in the old database to the RDL 2012 format.

  7. Run the schema synchronization with validation to synchronize the database schema changes.

    For more information, see How to: Synchronize the Tenant Database with the Application Database.

  8. Stop the Microsoft Dynamics NAV Server instance.

    You can use the Microsoft Dynamics NAV Server Administration tool or Set-NAVServerInstance cmdlet of the Microsoft Dynamics NAV Administration Shell.

    For information about the Microsoft Dynamics NAV Server Administration tool, see How to: Start, Stop, Restart, or Remove a Dynamics NAV Server Instance.

    To use the Set-NAVServerInstance cmdlet, run the following command:

    Set-NAVServerInstance –ServerInstance <ServerInstanceName> -Stop
    
  9. Clear all records from the dbo.Server Instance and dbo.Debugger Breakpoint tables in the old database in SQL Server.

    Using SQL Server Management Studio, open and clear the dbo.Server Instance and dbo.Debugger Breakpoint tables of the old database. For example, you can run the following SQL query:

    DELETE FROM [<My NAV Database Name>].[dbo].[Server Instance]
    DELETE from [<My NAV Database Name>].[dbo].[Debugger Breakpoint]
    
  10. (Optional) Before you start the following procedure, you can uninstall the old version of Dynamics NAV. When you uninstall Dynamics NAV, the database is still attached to the instance of SQL Server, which you can verify using SQL Server Management Studio.

Task 2: Converting the Old Database

Next, you will convert the old database so that it can be used in Microsoft Dynamics NAV 2017.

Tip

If you want to write a script that helps you convert databases, you can use the Invoke-NAVDatabaseConversion function in the Microsoft Dynamics NAV Development Shell.

To convert the database

  1. Install Microsoft Dynamics NAV 2017.

    Run the Microsoft Dynamics NAV 2017 Setup, and choose to install the Developer option.

  2. Run the Microsoft Dynamics NAV 2017 development environment as an administrator, and then connect to the database that you prepared in the previous task.

    If you do not run the development environment as an administrator, you will get an error and the conversion will be stopped.

    For more information, see How to: Open Databases.

  3. In the dialog box that appears, read the instructions carefully because this action cannot be reversed. When you are ready, choose the OK button, and then choose the OK button to confirm that you want to convert the database.

    Dynamics NAV will now convert the database. This includes an upgrade of system tables, and an upgrade of all reports to support Report Viewer 2012.

  4. When you are notified that the conversion was successful, choose the OK button.

  5. Connect a Microsoft Dynamics NAV 2017 Server instance to the converted database.

    You use the Microsoft Dynamics NAV Server Administration tool to connect a Microsoft Dynamics NAV Server instance to the converted database.

    In addition, you must add the service account that is used by the Microsoft Dynamics NAV Server instance as a member of the db_owner role in the Dynamics NAV database on SQL Server.

    For more information, see How to: Connect a Microsoft Dynamics NAV Server Instance to a Database and Giving the account necessary database privileges in SQL Server.

  6. Go to the development environment, and set it to use the Microsoft Dynamics NAV Server instance that connects to the database.

    For more information, see How to: Change the Microsoft Dynamics NAV Server Instance or Database Information.

  7. Run the schema synchronization with validation to complete the database conversion.

    For more information, see How to: Synchronize the Tenant Database with the Application Database.

  8. If the database references any assemblies (such as client control add-ins) that are not included on the Microsoft Dynamics NAV 2017 installation media (DVD), then add the assemblies to the Add-ins folder on Microsoft Dynamics NAV Server or Microsoft Dynamics NAV Windows client computers.

    For the Microsoft Dynamics NAV Windows client, the default path is C:\Program Files (x86)\Microsoft Dynamics NAV\100\RoleTailored Client\Add-ins folder.

    For Microsoft Dynamics NAV Server, the default path is the C:\Program Files\Microsoft Dynamics NAV\110\Service\Add-ins folder

  9. In the development environment, on the Tools menu, choose Build Server Application Objects, and then, in the dialog box, choose the Yes button.

  10. Fix compilation errors.

    If any errors occur, they are shown in the Error List window.

    For information about compilation errors when you are converting a Microsoft Dynamics NAV 2013 database, see Resolving Compilation Errors When Converting a Microsoft Dynamics NAV 2013 Database.

    For information about compilation errors when you are converting a Microsoft Dynamics NAV 2016 database, see Resolving Compilation Errors When Converting a Microsoft Dynamics NAV 2016 Database.

    You can find all objects which did not compile in the Object Designer window, by setting a field filter on the Compiled field.

  11. If you converted a Microsoft Dynamics NAV 2016, you will have to modify C/AL code to ensure that the My Settings page works properly in the Microsoft Dynamics NAV Web client. For more information, see Resolving My Settings Page Implementation After a Database Conversion.

  12. Upload the customer license to the converted database.

    For more information, see Uploading a License File for a Specific Database.

    You have now completed the conversion of the database to be accessed from Microsoft Dynamics NAV 2017. To test the converted database, you can connect it to the Microsoft Dynamics NAV 2017 Server instance that is used by Dynamics NAV clients, and then open a client.

Database and Windows collations

Starting from SQL Server 2008, SQL Server collations are fully aligned with the collations in Windows Server. If you upgrade to Dynamics NAV from Microsoft Dynamics NAV 2009, the step to convert the database includes upgrading the database from using SQL collations to using Windows collation. This collation change provides users with the most up-to-date and linguistically accurate cultural sorting conventions. For more information, see Collation and Unicode Support.

See Also

Upgrading the Application Code
Upgrading the Data
Upgrading to Microsoft Dynamics NAV 2017
Automating the Upgrade Process using Sample Windows PowerShell Scripts