Best Practices Tips and Tricks for Upgrading to Dynamics NAV 2013 R2 or Dynamics NAV 2015


Earlier, we announced that Dynamics NAV 2009 SP1 and Dynamics NAV 2009 R2 would go out of mainstream support in January 2015, and that means that the Classic Client stack is no longer supported:

Mainstream Support for Microsoft Dynamics NAV 2009 ends January 13 including 2009 SP1 and 2009 R2

We know that many of you have been upgrading to the latest version for years so that you would benefit from the various impreovements and new functionlity that new versions include. but with Classic Client no longer supported, it’s time to get your customers upgraded to the Dynamics NAV Windows client, and that’s why we issued lots of documents and articles to help you in this process, including the option of automating the upgrade process.

But over the past couple of years, we in the Support organization have collected a range of tips and tricks that we would like to share with you to help you get your customers upgraded. We will be summarizing those tips and tricks in 2 blogs, this one and another one following soon.

The purpose of this is to lay the ground for future upgrades, and to guide you in the best practices for upgrading from the older Dynamics NAV platforms to the latest.

This includes the following points:

  • Preparation – what should I take care of before I start?
  • What should I follow to guarantee a successful upgrade?
  • Known Issues and how to work around some complicated situations during upgrade.

Preparations

The first question is always, what should I take care of before I start? Do I have to prepare anything at all? What are the available toolkits to use, where do I find them?

Available Upgrade variations and toolkits

In this section we will be mentioning the available variations from toolkits and methods used to upgrade to Dynamics NAV 2013 R2 / Dynamics NAV 2015, so as you can plan which toolkit to use based on the current version of the database that need to be upgraded.

First, get the right upgrade toolkit for the job:

Upgrading from:

Toolkit / Variation:

Microsoft Dynamics NAV 2013

Standard Upgrade Toolkit. 

Microsoft Dynamics NAV 2013 / R2

Standard Upgrade Toolkit / Automated Data Upgrade

Microsoft Dynamics NAV 2009 SP1

Upgrade first to NAV 2013 and then to NAV 2013 R2 / NAV 2015

Microsoft Dynamics NAV 2009  R2

Upgrade Toolkit directly  to NAV 2013 R2 / NAV 2015

Older Version

Has to get first to Microsoft Dynamics NAV 2009

Get the upgrade toolkit from the product media of the version you upgrade to. At the end of this blog post, we list a couple of links to videos and steps.

OK, now I have the right tool kit, what should I take care of before I start?

So as you guarantee that you will not face big Issues while upgrading or later on while working on Microsoft Dynamics NAV 2013 R2 / Microsoft Dynamics NAV 2015, please consider the following:

      • Are all objects compiled?
          • You must make sure that all your objects are compiled before the transformation because any not compiled objects can be a potential reason for lots of upgrade issues.
        • What to do with third party objects?
          • Third party objects also have to be fully compiled before you start.
          • You have to have the right license that allows you to compile these objects.
          • If the third party objects are old, and no longer going to be used, you have to delete them before you start.
          • In some situations the license does not exist because there is no relation to the party that developed the component, in this case we have to work around this by deleting the objects from the database and cleaning it from the Objects table and the Objects Metadata table manually on the older database before you start.
        • Why should all objects (if possible) be compiled?
      • Are you using any other language / Localization different than W1?
        • Having a different collation?
          • There was a collation change between older and newer versions of NAV.
          • Starting from NAV 2013 we are pushing the use of Windows collations Vs SQL Server Collations, this means if you used SQL Server special collations in older Databases, you should have some extra work preparing the data.
          • It is mainly about ensuring that no Primary key fields depend on the SQL old collation, so in case you have primary Keys with any special characters, you might be obliged to work on these values before upgrading.
          • One example in the German language is the letter ‘ß’ that would be recognized from the 2 letters ‘SS’ only in some special collations in sql.
          • If you do have a violation of primary key related to such an example, be aware that it is a data issue, and it has to be manually treated.
          • Consider that collation changing for huge databases might be a long process that needs to be planned properly, we will be back to the collation point later on in this document, talking about collation issues.
        • Special caption problem?
          • More than once it was reported, that while converting the data in NAV 2013 R2 / NAV 2015, you get errors related to a value that is invalid.
          • Mainly these Values are coming from the captions of come objects in the older database.
          • After converting the data from non-Unicode to Unicode data, and moving some values between CAL to xml, some characters could give a value that is not recognized by NAV2013 R2 / NAV 2015.
          • These values would be saved in Metadata after or while compiling those objects the first time in NAV 2013 R2 / NAV 2015
          • As an example:
            “Hexadecimal value 0x[whatever] is an invalid character”
            To check what is valid and invalid, please check quickly the link below:
            http://seattlesoftware.wordpress.com/2008/09/11/hexadecimal-value-0-is-an-invalid-character/
          • The problem here is: sometimes you cannot know exactly where this value might exactly be.
          • If you do not know where the problem is, you could try removing the captions before starting the Upgrade, carry on with your upgrade without it and try to re-import it again afterwards.
      • Do you have Dimension codes and values especially coming from older versions?
        • The structure of dimensions in Microsoft dynamics NAV has changes couple of times between versions, especially if you come from a very old version.
        • What you need to make sure of before upgrading is that if you do have any dimensions used in details tables that they are also existing in the master table of dimensions.
        • Simply you need to make sure that the relation between the dimension value table and all dimension related transaction tables are well maintained.A famous example for a well-known error while upgrading to NAV 2013 R2 / NAV 2015 is the following:
          Dimension value IDmust contain a value in dimension set items‘: ‘dimension set id = 0, dimension code = COST CARRIERS‘. Value cannot be null or empty
          or
          ‘Dimension Value ID must have a Value in Dimension Set Entry’ 
          • This is mainly about the relation between the dimension value table and the transaction tables containing dimension Informations
          • For example the values that are in table 355 and do not exist in table 349 can cause such an error.

            You can check the consistency with a simple query (in case it is now related to a missing value in the G/L Entry table):

            select * from

             CRONUS AG$Ledger Entry Dimension] A

             where A.[Dimension Value Code] not in

             (

             select B.Code

             from

             [CRONUS AG$Dimension Value] B

             )

        • In case of any found inconsistency, check the values, and either to add it to the master table 349 or to delete it from 355.
        • The above query example would not apply to all situations, it is just an example to illustrate how to approach such an Issue.
        • Another reason for this, would be having some special characters in the dimension name, which might not be understood after the collation change that took place while opening the database the first time with the Dynamics NAV 2013 client.
        • There was also a good blog discussing the same behavior: http://www.mibuso.com/forum/viewtopic.php?t=57192
        • Another Example would be also related to dimensions in case you had something to do with Service management Module in older versions
          • Also in Step 2 in NAV 2013 R2 / NAV 2015 you would get a similar error:
        • The Metadata Object of Table 5930 was not found.

        •  There was an Older internal KB article related to upgrading to NAV 2009 with service management module Talking about this before stating the following:
        •  Due to major changes in the design of the Service Management functionality, it is necessary to remove unnecessary service-related data stored in the database to avoid data inconsistency and business logic gaps when upgrading to Microsoft Dynamics NAV 2009.

        • A simple solution to this would be deleting all records related to Table 5930 from table Posted Document Dimension before starting the step 2 at all.
      • Huge Database
        • Upgrading huge Databases should be carefully planned, starting from planning the right resources, up to planning enough time for testing, because it might take you the first time very long till you understand how to optimize he upgrade for a huge database.
        • Every database is a different situation, so please take you time planning for every database based on the following:
          • Do you have owned vertical solutions / customized add-ons.
          • Do you have many Companies in the same database?
          • Do you use FlowFields excessively in your customizations?
          • Is your database more or less than 100 GB, did you plan enough hardware resources on your test server? And please consider doing this starting from the first test to avoid wasting time testing on week machines.
          • Think also about involving Microsoft support from the beginning, to get some advices while planning your upgrade.
        • Huge databases might fall into performance issues while upgrading.
        • We will be back to the subject ‘Performance while upgrading’ again in this document, to talk about it in more details

What should I follow to guarantee a successful upgrade?

Upgrading to Dynamics NAV 2013 R2 / NAV 2015 can be a complex and a time consuming if you do not know what guide to follow, for such a long process you need to have always a step by step procedure to guide you till the end of this activity. We do have many materials on this in the community, partner source and on our blogs, but we thought it would be good to mention some of these recommended material so as you can follow while upgrading.

As we mentioned earlier in this blog post, it depends on which version of Dynamics NAV are you coming from. You can get an overview of the steps required in the MSDN Library here:

 

Also, you can watch these videos:

For upgrading from Dynamics NAV 2013 R2, you can use automation. For inspiration, watch this video:

https://www.youtube.com/watch?v=cuYV4FO97U0

This Toolkit with the step by step explanation on how to use it, can be found in the following Blog:http://blogs.msdn.com/b/nav/archive/2013/11/22/upgrade-toolkit-for-upgrading-data-from-microsoft-dynamics-nav-2009-r2-and-microsoft-dynamics-nav-2009-sp1-to-microsoft-dynamics-nav-2013-r2.aspx?PageIndex=2

For upgrading from Dynamics NAV 2009 SP1/R2, at first you had to upgrade to Dynamics NAV 20132, but how you can upgrade directly to Dynamics NAV 2015:

http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-components-postattachments/00-10-56-97-14/Upgrading-NAV-2009-R2-or-NAV-2009-SP1-Database-to-NAV-2015.pdf

And the newly released blog post:

http://blogs.msdn.com/b/nav/archive/2015/02/23/upgrading-from-microsoft-dynamics-nav-2009-r2-or-microsoft-dynamics-nav-2009-sp1-to-microsoft-dynamics-nav-2015.aspx

If you upgrade from an earlier verison thaan descirbed here, you have to first upgrade to Dynamics NAV 2009 SP1.

Be careful with the not compiled objects and the way data were stored in the older versions, as mentioned before in this document.

 

As I mentioned before, and that the amount of information is too big to be written in one blog, I will stop here, and complete the rest of the tricks in a future post.

Abdelrahman Erlebach

Microsoft Dynamics NAV Support EMEA

Comments (16)

  1. Natalie K. says:

    Thank you very much for your detailed article.

    I think there is a typo in your table: the last line should be "Has to get first to Microsoft Dynamics NAV 2009 SP1" (the SP1 was missing).

  2. Abdelrahman Erlebach says:

    Hello Natalie,

    Thanks a lot for the Response, I will be completing this article with another one mentioning the known issues while upgrading, it suppose to come live next week.

    And thanks for Point me to the tipping mistake, will try to recover it 🙂

    Thanks,

    Abdelrahman Erlebach

  3. TharangaC says:

    Thank you very much for the detailed article.

  4. Abdelrahman Erlebach says:

    Thank you for the Feedback, I will be following Up with the second part of this article hopefully this week.

  5. Damaris P says:

    Thank you for this very good article 🙂

  6. Larry Anesu says:

    Thanks for the information.you tried by all means to put together all  the information for one to do a successful upgrade. that was a great tip and trick…Waiting for the next chapter.

  7. nutcracker says:

    thank you very much for this wonderful article.

  8. Abdelrahman Erlebach says:

    Thank you all for the Feedbacks, hopefully the second part will be published this week.

  9. guido robben says:

    There is a serious issue with the upgrade of the dimensions.

    The function CreateTablesQry creates a query that is executed. As you can see, the company name is "22 Bouwers Van Braam-Minnesma". This creates a problem with the add contraint. It cannot start with a number and "-" is not allowed.

    select DISTINCT DimSetID,DimVal1,DimVal2 into [22 Bouwers Van Braam-Minnesma$upgrade355_DimSetID]  from [22 Bouwers Van Braam-Minnesma$upgrade355_Dim]  alter table [22 Bouwers Van Braam-Minnesma$upgrade355_DimSetID] add ID int identity  alter table [22 Bouwers Van Braam-Minnesma$upgrade355_DimSetID] add constraint _22BouwersVanBraamMinnesma$pk_dim355_id primary key (ID)  

  10. Abdelrahman Erlebach says:

    Hello Guido,

    Thank for the feedbacks, and sorry for my late answer, it is very known issue, the point of the name starting with number was actually fixed I think in the Update rollup 4 of NAV 2015, but the issue of the '-' or any special chars is not yet fixed, and I think it is anyway against the normal naming convention, and won't be fixed, AS I said please avoid any of these special chars in the names:[ ~ @ # $ % & * ( ) . ! % – + / = ? ]

    You find more info about this in my second blog:

    blogs.msdn.com/…/best-practices-tips-and-tricks-during-upgrade-to-dynamics-nav-2013-r2-or-dynamics-nav-2015-part-2.aspx

    section: Company Names in Dynamics NAV 2015

    I hope this helps.

    Abdelrahman Erlebach

  11. Nimesh P says:

    Hi Abdelrahman E,
    I am working for a company who has MS Business Solution NAV 4.00.004 and they want to upgrade it to latest version of NAV, how do i proceed for this upgrade ? Appreciated your help in this matter.

    Regards
    Nimesh P

    1. Abdelrahman Erlebach says:

      @Nimesh, sorry for the Late Answer!
      first of all you need to evaluate the performance on your database before you start, and once you have the database in a good shape, then you start moving it to nav 2009 R2, the easiest way would be to create a nav backup (tools–>Backup) and then in nav 2009 R2 you should create a new database (based on SQL Serve) and restore the backup inside.

      Once you have this done, you can follow all the points I added in this blog and the second part of it,

      If you get any difficulties, you can open a support case with Microsoft support team, and just mention my name on it.

      Abdelrahman Erlebach

  12. Martin says:

    Thank you, You saved me a lot of nerve :). Our customer had habit in deleting unused Dimension Value records and I was going crazy about problems with failing dimension conversion.

  13. Sandra K. says:

    Hi Abdelrahman,
    you wrote at the section “Huge Database”: We will be back to the subject ‘Performance while upgrading’ again in this document, to talk about it in more Details. Is this already online?
    Sandra

    1. Abdelrahman Erlebach says:

      @Sandra, sorry for the late response, actually more related Infos have been written in the second part:
      blogs.msdn.com/…/best-practices-tips-and-tricks-during-upgrade-to-dynamics-nav-2013-r2-or-dynamics-nav-2015-part-2.aspx