Compartilhar via


Upgrading the Data

This topic describes the tasks required for upgrading a Microsoft Dynamics NAV 2013 or Microsoft Dynamics NAV 2013 R2 database to Microsoft Dynamics NAV 2015.

You use data conversion tools provided with Microsoft Dynamics NAV 2015 to convert the old data with the old version’s table and field structure, so that it functions together with the new version’s table and field structure.

  • Prerequisites

  • Task 1: Create a full SQL backup of the old database on SQL Server

  • Task 2: Upload the Microsoft Dynamics NAV 2015 license to the old database

  • Task 3: Delete all objects except tables

  • Task 4: Uninstall the old product and install the new

  • Task 5: Convert the old database to a Microsoft Dynamics NAV 2015 format

  • Task 6: Connect a Microsoft Dynamics NAV 2015 Server instance to the converted database

  • Task 7: Run the schema synchronization to complete the database conversion

  • Task 8: Import the application objects to the converted database

  • Task 9: Run the schema synchronization to synchronize the new tables

  • Task 10: Run the data upgrade process

  • Task 11: Delete the upgrade objects and obsolete tables

  • Task 12: Import upgraded permission sets and permissions by using the Roles and Permissions XMLports

  • Task 13: Set the language of the customer database

  • Task 14: Add new control add-ins

Important

During the data upgrade, you must make sure that your computer uses the same codepage as the data. When you use conflicting codepages, some characters will not display in captions, and you might not be able to access the upgraded database. Optionally, you can export the captions before the upgrade. For more information, see How to: Add Translated Strings for Conflicting Text Encoding Formats.

If you upgrade a database using a different codepage, Microsoft Dynamics NAV must remove incorrect metadata characters to complete the data upgrade. Then, you must open the database in the development environment on a computer with the relevant codepage and compile all objects. This adds the missing characters again.

Prerequisites

Task 1: Create a full SQL backup of the old database on SQL Server

You must 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.

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

Task 2: Upload the Microsoft Dynamics NAV 2015 license to the old database

In the development environment, upload the Microsoft Dynamics NAV 2015 license to the database. For more information, see Uploading a License File for a Specific Database.

Task 3: Delete all objects except tables

Open the old database in the Microsoft Dynamics NAV 2013 or Microsoft Dynamics NAV 2013 R2 Development Environment, open Object Designer, and then delete all objects except tables.

Task 4: Uninstall the old product and install the new

Uninstall Microsoft Dynamics NAV 2013 or Microsoft Dynamics NAV 2013 R2, and then install Microsoft Dynamics NAV 2015.

During installation of Microsoft Dynamics NAV 2015, you can either choose the Install Demo option, for which you will discard the Demo database afterwards, or choose the Custom option, where you then select to install the Client (with the Development Environment), Server, and Administration Tool components.

Task 5: Convert the old database to a Microsoft Dynamics NAV 2015 format

To convert the old database to a Microsoft Dynamics NAV 2015 format, open the old database in the development environment, and follow the conversion instructions.

Task 6: Connect a Microsoft Dynamics NAV 2015 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 Microsoft Dynamics NAV database on SQL Server.

Important

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

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

Task 7: Run the schema synchronization to complete the database conversion

You can run the schema synchronization from the Microsoft Dynamics NAV Development Environment or Microsoft Dynamics NAV 2015 Administration Shell.

From the development environment:

Open development environment as an administrator. On the Tools menu, choose Sync. Schema For All Tables, and then choose With Validation and follow the schema synchronization instructions.

From the Microsoft Dynamics NAV 2015 Administration Shell:

Open the Microsoft Dynamics NAV 2015 Administration Shell as an administrator, and then run Sync-NavTenant cmdlet as follows:

Sync-NavTenant –ServerInstance <ServerInstanceName>

Replace <ServerInstanceName> with the name of the Microsoft Dynamics NAV Server instance that is connected to the database. For more information, see How to: Run the Sync-NAVTenant Cmdlet.

Task 8: Import the application objects to the converted database

In the development environment, import all the application objects that you want in the Microsoft Dynamics NAV 2015 database. This includes the FOB file that contains all the Microsoft Dynamics NAV 2015 objects from the application code upgrade and upgrade toolkit objects.

When you import the FOB file, if you experience metadata conflicts, use the Import Worksheet to handle these conflicts.

Finally, on the dialog box for selecting the schema synchronization, set the Synchronize Schema option to Later.

If the upgrade toolkit objects are stored in a separate FOB file, then import the upgrade toolkit FOB file after the application objects are imported.

Task 9: Run the schema synchronization to synchronize the new tables

Similar to task 7, to publish the data schema changes of the newly imported tables to the SQL tables, run the Sync. Schema For All Tables – With Validation option from the development environment or run the Sync-NavTenant cmdlet from the Microsoft Dynamics NAV 2015 Administration Shell.

Task 10: Run the data upgrade process

A data upgrade runs the upgrade toolkit objects, such as upgrade codeunits and upgrade tables, to migrate business data from the old table structure to the new table structure. You can start the data upgrade from the Microsoft Dynamics NAV Development Environment or Microsoft Dynamics NAV 2015 Administration Shell.

From the development environment:

Open development environment as an administrator. On the Tools menu, choose Data Upgrade, and then choose Start and follow the instructions.

To view the progress of the data upgrade, on the Tools menu, choose Data Upgrade, and then choose Show Progress.

From the Microsoft Dynamics NAV 2015 Administration Shell:

Open the Microsoft Dynamics NAV 2015 Administration Shell as an administrator, and then run Start-NavDataUpgrade cmdlet as follows:

Start-NavDataUpgrade -ServerInstance <ServerInstanceName> -Force

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

To view the progress of the data upgrade, you can run Get-NavDataUpgrade cmdlet with the –Progress switch.

Note

The data upgrade process runs CheckPreconditions and Upgrade functions in the upgrade codeunits. If any of the preconditions are not met or an upgrade function fails, you must correct the error and resume the data upgrade process.

Task 11: Delete the upgrade objects and obsolete tables

At this point, you have upgraded the database to Microsoft Dynamics NAV 2015. Now, you can delete the tables which are not needed into the new application, plus the upgrade codeunits and upgrade table objects that you imported in task 8.

For application tables, you can see which the tables are marked for deletion in the Version List column in the Tables list of Object Designer. During the data upgrade that you performed in task 9, these tables were marked with the text Old Unused Table - marked for deletion.

When you delete tables, if you don’t need the data that is saved in the tables, then on the Delete dialog box, set the Synchronize Schema option to Force.

Task 12: Import upgraded permission sets and permissions by using the Roles and Permissions XMLports

You import the permission sets and permissions XML files according to the following procedure.

To import the permission sets and permissions

  1. Delete all permission sets in the database except the SUPER permission set.

    In Object Designer, run page 9802 Permission Sets, and then delete the permission sets.

  2. Run XMLport 9171 Import/Export Permission Sets to import the permission sets XML file,

    In the request page for the XMLport, in the Direction field, choose Import, choose the OK button, and then specify the permission sets XML file.

  3. Run XMLport 9172 Import/Export Permissions to import the permission XML file.

    In the request page for the XMLport, in the Direction field, choose Import, choose the OK button, and then specify the permissions XML file.

Task 13: Set the language of the customer database

In the development environment, choose Tools, choose Language, and then select the language of the original customer database.

Task 14: Add new control add-ins

The database is now fully upgraded and is ready for use. However, you may want to add the new client control add-ins that are included in Microsoft Dynamics NAV 2015. These are not added by the upgrade process. The following client control add-ins are available from the Microsoft Dynamics NAV product media:

  • Microsoft.Dynamics.Nav.Client.BusinessChart

  • Microsoft.Dynamics.Nav.Client.PageReady

  • Microsoft.Dynamics.Nav.Client.PingPong

  • Microsoft.Dynamics.Nav.Client.VideoPlayer

  • Microsoft.Dynamics.Nav.Client.SocialListening

You can add control add-ins in the Control Add-ins window in the Microsoft Dynamics NAV Windows client. For more information, see How to: Register a Windows Client Control Add-in.

See Also

Other Resources

Upgrading the Application Code
Automating the Upgrade Process using Sample Windows PowerShell Scripts
Synchronizing Table Schemas