This article describes how to convert a Dynamics NAV database from one of the following versions to Microsoft Dynamics NAV 2018:
- Microsoft Dynamics NAV 2013
- Microsoft Dynamics NAV 2013 R2
- Microsoft Dynamics NAV 2015
- Microsoft Dynamics NAV 2016
- Microsoft Dynamics NAV 2017
- Microsoft Dynamics NAV 2018 (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 latest Microsoft Dynamics NAV 2018 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.
Task 1: Preparing the Old Database
To convert the old database to a Microsoft Dynamics NAV 2018 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 2018 to the next cumulative update. In this case, you only have to complete task 2.
To prepare the old database
- Make a copy of the old database or create full database backup.For more information, see Create a Full Database Backup (SQL Server).
- 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.
- In Object Designer, verify that all objects are compiled and no objects are locked.For more information about compiling objects, see Compiling Objects.If one or more objects are locked, the conversion process cannot update the database version number. As a result, the conversion does not complete. For more information, see Locking and Unlocking Objects.
- On the Tools menu, choose Build Server Application Objects, and then choose the Yes button.
- If any errors occur, they are shown in the Error List window. Make sure that you address all compilation errors before you continue.
- Upload the Microsoft Dynamics NAV 2018 Partner license to the database.For more information, see Uploading a License File for a Specific Database.ImportantThe 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 format.
- 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.
- Stop the Microsoft Dynamics NAV Server instance, and close the development environment.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-Stop - Clear all Microsoft Dynamics NAV Server instance records from the dbo.Server Instance table in the database on SQL Server.You can do this by using SQL Server Management Studio to clear the table. For example, you can run the following SQL query:
DELETE FROM [My NAV Database Name].[dbo].[Server Instance] - (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 with Microsoft Dynamics NAV 2018.
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
- If the database is on Azure SQL Database, add your user account to the dbmanager database role on the master database.This membership is only required for converting the database, and can be removed afterwards.
- Install Microsoft Dynamics NAV 2018.Run the Microsoft Dynamics NAV 2018 Setup, and choose to install the Developer option.
- Run the Microsoft Dynamics NAV 2018 development environment as an administrator.
- If the development environment is already connected to the old database, a dialog box about converting the database appears. Go to the next step.
- Otherwise, connect to the old database that you prepared in the previous task, and then go to the next step.For more information, see How to: Open Databases.
- In the dialog box that appears, read the instructions about converting the database 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 reports.
- When you are notified that the conversion was successful, choose the OK button.
- If the database references any assemblies (such as client control add-ins) that are not included on the Microsoft Dynamics NAV 2018 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.
- Connect a Microsoft Dynamics NAV 2018 Server instance to the converted database.Use the Microsoft Dynamics NAV Server Administration tool or the Set-NAVServerConfiguration cmdlet to connect a Microsoft Dynamics NAV Server instance to the converted database.ImportantThe service account that is used by the Microsoft Dynamics NAV Server instance must be a member of the db_owner role in the Dynamics NAV database on SQL Server or Azure SQL Database.
- 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.
- Compile all objects without table schema synchronizing; you will do this later.For more information, see Compiling Objects.
- Fix compilation errors.If any errors occur, they are shown in the Error List window. For help on resolving the errors, see the following:
-
You can find all objects which did not compile in the Object Designer window, by setting a field filter on the Compiled field.
- Recompile published extensions.Use the Repair-NAVApp cmdlet of the Microsoft Dynamics NAV 2018 Administration Shell to compile the published extensions to make sure they are work with the new platform.For example, you can run the following command to recompile all extensions:
Get-NAVAppInfo -ServerInstance| Repair-NAVApp - 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.
- 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.
- 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 2018. To test the converted database, you can connect it to the Microsoft Dynamics NAV 2018 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 Microsoft Dynamics NAV 2018 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.
No comments:
Post a Comment