Upgrade Toolkit for Upgrading Data from Microsoft Dynamics NAV 2009 R2 and Microsoft Dynamics NAV 2009 SP1 to Microsoft Dynamics NAV 2013 R2

Upgrade Toolkit for Upgrading Data from Microsoft Dynamics NAV 2009 R2 and Microsoft Dynamics NAV 2009 SP1 to Microsoft Dynamics NAV 2013 R2

Rate This
  • Comments 48

The components needed to upgrade data directly from Microsoft Dynamics NAV 2009 R2 to Microsoft Dynamics NAV 2013 R2 are now available for download.

Download the upgrade toolkit from PartnerSource or from CustomerSource

In order to use the toolkit to upgrade data from Microsoft Dynamics 2009 R2 or Microsoft Dynamics NAV 2009 SP1, you will also need the Microsoft Dynamics NAV 2013 development environment and Microsoft Dynamics NAV 2013 R2.

At the Directions EMEA conference in Vienna and the Directions US conference in Nashville, we said that we have a team that is focusing on the Microsoft Dynamics NAV upgrade story. Going through the big transformation from the classic stack to the new product architecture in Microsoft Dynamics NAV 2009 was not easy and is challenging many customers and partners. So for our team, it is essential that the final outcome of our work is that each upgrade is easier, requires significantly less effort, and that it does not disrupt the daily business for our customers.

In Microsoft Dynamics NAV 2013 R2, we introduced support for converting a Microsoft Dynamics NAV 2013 database so that you can run an application that was created in Microsoft Dynamics NAV 2013 on the Microsoft Dynamics NAV 2013 R2 platform, also known as a technical upgrade.

Note: We strongly recommend that you upgrade the application objects as well so that your solution includes the important application fixes and new functionality that is introduced in Microsoft Dynamics NAV 2013 R2.

Secondly, you can fully automate the data upgrade process using the Windows PowerShell scripts that we included in the Microsoft Dynamics NAV 2013 R2 product media. Historically, this process has been known for its tediousness and high risk of human error when multiple operations had to be executed consecutively in all companies of the database that you were upgrading. The scripts automate this work so that you can test and execute your data upgrades more reliably.

Now with this delivery, we introduce an upgrade toolkit for upgrading the data from Microsoft Dynamics NAV 2009 R2 to Microsoft Dynamics NAV 2013 R2. This significantly simplifies the upgrade process for those of you coming from Microsoft Dynamics NAV 2009 R2 – or Microsoft Dynamics NAV 2009 SP1.

Included in the new upgrade toolkit are all known data upgrade-related application hotfixes that we are aware of, and we also addressed several platform issues that affected the upgrade scenario.

Note: You must download the latest Microsoft Dynamics NAV platform hotfixes before you start using the upgrade toolkit. The required hotfixes for Microsoft Dynamics NAV 2013 are available in the latest hotfix rollup, which you can download from PartnerSource or CustomerSource. For Microsoft Dynamics NAV 2013 R2, you can download the required hotfixes from PartnerSource or CustomerSource.

When you download the new upgrade toolkit from the link above, you can use it to simply your upgrade process. Here are the main steps in upgrading from Microsoft Dynamics NAV 2009 R2 (or Microsoft Dynamics NAV 2009 SP1) by using the new upgrade toolkit.

Note

Before you start, make sure that you use the latest platform binaries for all versions of Microsoft Dynamics NAV in this process. For more information, see the following pages for the latest updates to the versions of Microsoft Dynamics NAV:

Microsoft Dynamics NAV 2009 R2: Overview of Released Platform Hotfixes for Microsoft Dynamics NAV 2009 SP1 and Microsoft Dynamics NAV 2009 R2.

Microsoft Dynamics NAV 2013: Released Cumulative Updates for Microsoft Dynamics NAV 2013.

Microsoft Dynamics NAV 2013 R2: Released Cumulative Updates for Microsoft Dynamics NAV 2013 R2.

To upgrade data from a Microsoft Dynamics NAV 2009 R2 or Microsoft Dynamics NAV 2009 SP1 database

  1. In the Microsoft Dynamics NAV  2009 R2 or Microsoft Dynamics NAV  2009 SP1 development environment (Classic client):
    1. Make sure that all table objects have compiled successfully. During compilation, Microsoft Dynamics NAV generates or regenerates the BLOB content in the Object Metadata table that is used in the later steps.  In the Tools menu, choose Build Server Application Objects.
      Note: You must also do this if you upgrade from Microsoft Dynamics NAV 2013 to Microsoft Dynamics NAV 2013 R2 . All tables must be compiled Microsoft Dynamics in NAV 2013 before you start upgrading to Microsoft Dynamics NAV 2013 R2.
    2. Create a copy or a backup of your old Microsoft Dynamics NAV 2009 R2 database, and open it in the Microsoft Dynamics NAV 2009 R2 development environment.
    3. Add your partner license to the database.
      You can do this by selecting the Save License in Database field in the Alter Database window. If the field was not already selected, a dialog box opens so you can specify the location of your partner license.
      If the field was already selected, upload the partner license from the License Information window.
    4. Open the Object Designer, and then import Upgrade601701.1.fob. If the .fob file contains objects with conflicting versions that are already in the database, the Import Worksheet window opens. Choose Replace All.
    5. For each company in the database, open the company, and make the relevant changes to data. For more information, see Task 3: Data/Object Changes Prior to Step 1 in the MSDN Library.
  2. Then, from the Object Designer, run form 104001, Upgrade - Old Version. Choose the Transfer Data button. Repeat this action for each company in the database. 
    Note
    We strongly recommend that you back up the database using SQL Server management tools after this step. 
  3. When you have transferred all data for all companies, in the Upgrade - Old Version window, choose the Delete Objects button.
    This action deletes all objects in the database that are not tables, but also obsolete tables that belong to functionality that is not available in Microsoft Dynamics NAV 2013 R2.
  4. Uninstall Microsoft Dynamics NAV 2009 R2, and then install Microsoft Dynamics NAV 2013.
    Note
    You do not have to install the full Microsoft Dynamics NAV 2013 product to perform the following database conversion. Instead, you can create a folder with the following files from the Microsoft Dynamics NAV 2013 product media:
    • Finsql.exe
    • Fin.stx
    • Fin.etx
    • CRONUS.FLF
    • Ndbcs.dll

    You can then use the Finsql.exe file to perform the conversion.  

  5. Change the compatibility level of your database. For SQL Server 2008 and SQL Server 2008 R2, verify that the compatibility level of the database is set to 100. For SQL Server 2012, set the compatibility level to 110.
  6. In the Microsoft Dynamics NAV 2013 development environment, open the Microsoft Dynamics NAV 2009 R2 database and agree to convert the database. The database has now been technically upgraded to Microsoft Dynamics NAV 2013.

    Note 
    During this step, Microsoft Dynamics NAV converts all text and code fields to Unicode format by changing their SQL Server data type. This conversion requires more disk space than usual, since both the database and the log file will grow in size considerably. It can also be a lengthy process.

    If your Microsoft Dynamics NAV 2009 R2 database is using SQL Server Collation, within the same step the collation will be changed to a suitable Windows collation. This is because Microsoft Dynamics NAV 2013 and higher versions only support Windows Collation. If you converted your database using the RTM version of Microsoft Dynamics NAV 2013, you may be experiencing collation-related issues after this conversion. Therefore it is strongly recommended to use the latest available version of Microsoft Dynamics NAV 2013 development environment to perform this step.

    Note
    We strongly recommend that you take a full SQL Server backup at this stage when the database conversion has completed.

  7. Uninstall Microsoft Dynamics NAV 2013, and then install Microsoft Dynamics NAV 2013 R2.
  8. In the Microsoft Dynamics NAV 2013 R2 development environment:
    1. Open the Microsoft Dynamics NAV 2013 database and agree to convert the database.
    2. Compile the system tables. You can find the tables by setting a filter for table ID 2000000004..2000000130.
      In the following step, you will be connecting a Microsoft Dynamics NAV Server instance to the database. 
  9. Make sure that the service account that the Microsoft Dynamics NAV Server instance uses has the db_owner role for the database. 

    Note 
    If you are upgrading a large database, such as a database size of more than 20-25 GB, make sure that you increase the timeout value in the Microsoft Dynamics NAV Server configuration file. In the CustomSettings.config file, the value is defined in the SQL Command Timeout node. The default value is 10 minutes, which is sufficient in the normal day-to-day work. However, during an upgrade that can take several hours depending on the size of the tables, you must increase the timeout period.

  10. Connect the Microsoft Dynamics NAV Server instance to the database, and then start the service instance.
  11. In the Microsoft Dynamics NAV 2013 R2 development environment:
    1. On the Tools menu, open Options, and then, make sure that the Prevent data loss from table changes field is set to Yes.You must also make sure that the Server Name, Server Instance, and Server Port fields are filled in.
      This ensures that the Microsoft Dynamics NAV Server instance that is connected to the database will verify that no operation will cause loss of data in the development environment.
    2. Import all customized objects in .fob format into the upgraded database. If the .fob file contains objects with conflicting versions that are already in the database, the Import Worksheet window opens. Choose Replace All.
    3. Make sure all objects are compiled.

      Important
      It is very important that at least all table objects have successfully compiled before you proceed.

    4. Import Upgrade Step 2 objects from the Upgrade601701.2.fob file.If the .fob file contains objects with conflicting versions that are already in the database, the Import Worksheet window opens. Choose Replace All.
  12. Perform the database schema synchronization by running the Sync-NAVTenant Windows PowerShell cmdlet in the Microsoft Dynamics NAV 2013 R2 Administration Shell (run as administrator).

    Note
    When you upgrade from one version to another, this typically involves numerous changes in the structure of the Microsoft Dynamics NAV tables (the object metadata). Database synchronization ensures that these changes in the metadata are applied to the corresponding tables in SQL Server. For example, it changes columns dimensions and data types, drops and create indices, drops and creates indexed views (V-SIFT), creates new tables, columns, and so on.

    When the number of changes is high, such as comparing Microsoft Dynamics NAV 2009 R2 to Microsoft Dynamics NAV 2013 R2, this synchronization can become a lengthy and resource consuming task.

    Database synchronization is triggered upon any request to Microsoft Dynamics NAV Server, such as when you start a client or run a windows Powershell cmdlet. Microsoft Dynamics NAV Server checks if metadata has changed since the last synchronization by comparing the content of the Object Metadata and Object Metadata Snapshot system tables. If a change is found, the synchronization procedure is initiated.  

    When the synchronization process has started, it is essential that you wait for it to complete or rollback (in case of an error or time-out). If you’re running a client, do not confirm or click anything client side. If you’re running the Sync-NAVTenant cmdlet, wait for it to complete and return control to the Windows PowerShell command prompt.

    Do NOT stop the Microsoft Dynamics NAV Server service at this point since there are high chances that the database synchronization transaction is still running.

    1. Run Microsoft Dynamics NAV 2013 R2 Administration Shell as Administrator. This opens a PowerShell prompt where the Microsoft Dynamics NAV cmdlets are available.

    2. Run the synchronization command against your upgrade database as follows: 

      Sync-NAVTenant –ServerInstance <MyNAVServerInstance> 

    3. Wait until the cmdlet returns control to the Windows PowerShell window.

  13. Open the Microsoft Dynamics NAV 2013 R2 Windows client to verify that you are connected to the Microsoft Dynamics NAV Server instance that is connected to the database being upgraded. 
    Next, you will run Upgrade Step 2 in each company in the upgraded database. You can get a list of all existing companies in the database by running the Get-NAVCompany cmdlet and passing as an argument the Microsoft Dynamics NAV Server instance which is connected to the upgraded database. 
    You will run objects directly from the development environment, so you must specify the company that the objects must run in in the Options window.
  14. In the Microsoft Dynamics NAV 2013 R2 development environment:
    1. On the Tools menu, open Options, and then, in the Company field, specify the name of the first company.
    2. In the Object Designer, find page 104002 Upgrade - New Version, and then choose Run.
    3. In the Upgrade - New Version window, choose Test Database Connection to make sure that the C/AL code that is triggered by the actions on the page has access to the database.
      If your database is on a named SQL Server instance, you must specify the full name in the SQL Server Name field.  
    4. Choose Transfer Data.
      If the process is successful, and you don't have to revisit the upgrade logs, you can clean the content of the Upgrade Time Log  table. 
    5. On the Navigate tab, choose Time Log, and then, in the Upgrade Time Log page, delete all records.
    6. Close the Upgrade - New Version window, and then close the Microsoft Dynamics NAV Windows client.
  15. Repeat step 14 for each remaining company in the database.
  16. When you have successfully transferred data in the last company, you must upgrade data that is common to all companies in the database, such as permissions, permission sets, web services, profiles and control add-ins.
  17. Upgrade data common to all companies such as permissions, permission sets, web services, profiles and control add-ins.
    If the customer has changed the Read/Write/Modify/Delete/Execute settings for any of the standard permissions, or customized default permission sets in any way, you must merge these changes into the default permissions sets and permissions that are included in Microsoft Dynamics NAV 2013 R2. You can use XMLport 104001 Import/Export Roles and XMLport 104002 Import/Export Permissions to export the new default roles and permissions from the CRONUS International Ltd. demonstration database in Microsoft Dynamics NAV 2013 R2. 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. For example, the following client control add-ins are available from the Microsoft Dynamics NAV 2013 R2 product media:
    • Microsoft.Dynamics.Nav.Client.BusinessChart
    • Microsoft.Dynamics.Nav.Client.PageReady
    • Microsoft.Dynamics.Nav.Client.PingPong
    • Microsoft.Dynamics.Nav.Client.VideoPlayer
  18. Delete the upgrade toolkit objects.
    1. In the Upgrade - New Version window, choose Mark/Delete Upgrade Toolkit.
      This deletes all upgrade toolkit objects, except tables
    2. In the Microsoft Dynamics NAV development environment, delete the upgrade tables by setting a field filter for objects where the Version List contains Upgrade Toolkit Table - marked for deletion.

The database has now been through a data upgrade to Microsoft Dynamics NAV 2013 R2.

Best regards,

The Microsoft Dynamics NAV Service Experience team

-----Blog post updated in May 2014-----

 

Leave a Comment
  • Please add 7 and 7 and type the answer here:
  • Post
  • Hi guys, none of the links to partnersource seems to be working.

  • The link above for the 2013R2 hotfixes is not working. When you select it you receive the following.  The 2031 Hotfix link works fine. Thanks

    Our Apologies…

    This Page Could Not Be Found

    The page you are looking for has moved or no longer exists – or you might have entered an incorrect Web site address (URL). You might find what you are looking for in one of these areas:

    Learn more about Microsoft Dynamics Solutions including:

    Microsoft Dynamics CRM

    Microsoft Dynamics AX

    Microsoft Dynamics GP

    Microsoft Dynamics NAV

    Microsoft Dynamics SL

    For current Microsoft Business Solutions customers:

    CustomerSource

    For Microsoft Certified Business Solutions Partners:

    PartnerSource

  • Hello all,

    Sorry about the confusion! The links to PartnerSource for the hotfixes for Microsoft Dynamics NAV 2012 R2 are not yet active due to an internal delay. They will be available in a couple of days, we hope, and this will be announced on this blog as well.

    Meanwhile, the application hotfixes that you need are included in the upgrade toolkit.

    Best regards,

    The Microsoft Dynamics NAV Service Experience team

  • Hi all,

    The links are now live!

    Best regards,

    The Microsoft Dynamics NAV Service Experience team

  • nice blog and information about Upgrade Toolkit for Upgrading Data from Microsoft Dynamics NAV 2009 R2 and Microsoft Dynamics NAV 2009 SP1 to Microsoft Dynamics NAV 2013 R2 and <a href="www.datasparc.com/download.html"> soracle tools </a>.

  • Hi guys,

    Any ETA on the upgrade tool for W1 ?

  • W1 and NO should be available latest 10/12/2013.

    Kind regards,

    Dmitry Chadayev & The Microsoft Dynamics NAV Service Experience team

  • Not Working Properly for Indian Localization, After upgrading in NAV 2013 R2 it's giving error as below,

    The following SQL error was unexpected.

    Invalid column name 'Queue Folder Path'.

    Invalid column name 'Queue Folder UID'.

    Invalid column name 'Storage Folder Path'.

    Invalid column name 'Storage Folder UID'.

    Invalid column name 'Autodiscovery E-Mail Address'.

    Invalid column name 'Email Batch Size'.

    Statement(s) could not be prepared.

    And as I checked in both SQL, and development environment, the fields are there.

  • Hi, I got the following Error executing the Page 104002 on Upgrade601701 with Build 7.1.35701.0, could you help me?

    Microsoft Dynamics NAV

    ---------------------------

    Fehler beim Kompilieren von Assembly 'C:\ProgramData\Microsoft\Microsoft Dynamics NAV\71\Server\MicrosoftDynamicsNavServer$NAVISRV2013R2\assembly\Record104002_85.dll'. Dies kann auf Unterschiede zwischen Binärdateien in der Installation oder der Datenbank zurückzuführen sein. Stellen Sie sicher, dass alle Installationskomponenten konsistent und auf dem neuesten Stand sind. Fehlerdetails: 'c:\ProgramData\Microsoft\Microsoft Dynamics NAV\71\Server\MicrosoftDynamicsNavServer$NAVISRV2013R2\source\Record\Record104002.cs(16,54) : error CS1729: 'Microsoft.Dynamics.Nav.Runtime.NavTextConstant' does not contain a constructor that takes 5 arguments

    ---------------------------

    Regards,

    Thomas

  • @Thomas: Did you restart the middle-tier?

  • @Sebastiaan: Yes I did.

  • Now it works, I have restarted the Service directly.

    If I restart (or stop and start) via Admintool it doesn't works.

    I think the Administration Tool must be closed while restarting the services, if the Tool isn't closed it didn't restart the whole process?!

  • Hi Uday Mer,

    We've seen this issue before. It should not appear if you compile the system tables immediately after the second database conversion (as instructed in step 7b), before connecting the NST to the database. Once the system tables are compiled, you can connect the NAV Server to the database (or restart the server if it was already pointing to the database) and proceed.

    Hope this will help you.

    Kind regards,

    The Microsoft Dynamics NAV Service Experience Team

  • In step 9b I could not import the table objects because of this kind of errors:

    The operation could not complete because a record in the ... table was locked by another user. Please retry the activity.

    With trial and error could import it if I compile 100 tables (doesn't matter if it gives error about not existing codeunit, forms, etc.) and then import 100 new table objects. And so on..

  • I get this error when i run the upgrade tool from 6 to 7.1 on some companies

    does anyone have any how to fix that ?

    Microsoft Dynamics NAV

    ---------------------------

    A call to System.Data.SqlClient.SqlCommand.ExecuteNonQuery failed with this message: Column name 'DimVal1' does not exist in the target table or view.

    ---------------------------

    OK

    ---------------------------

Page 1 of 4 (48 items) 1234