Using NAV/BC different Cumulative Update versions in the same machine

In my previous article Dynamics NAV Server hack by examples I’ve enumerated some tips on how to create and maintain NAV servers in a very hacky way.

In this article I want to show you how to use Powershell modules with the same NAV/BC version but different cumulative updates on the same machine.

Please note that from now on I’ll refer to Business Central (BC) only but this article applies to Dynamics NAV as well.

I’ll describe the steps I’ve followed to install BC Spring Release RTM (14.0.29530.0) and BC Spring Release CU2 (14.0.34444.0) in the same machine.

BC Installation (NST, RTC & Web Client)

  • To install BC SR RTM run the setup from the installation files

Please note that I’ve changed the installation path and database name adding the suffix _RTM to distinguish from later versions where I’ve used the _CU2 suffix.

  • After the installation I’ve tried to install BC SR CU2 from the installation files as well but I didn’t have the option to install BC SR CU2 as a different application. The setup shows that BC Spring Release is already installed although I’m installing a different cumulative update.
  • If I try to run the ServiceTier setup executable directly I get the following error message:

Well, it seems that Microsoft doesn’t allow us to install two cumulative updates for the same NAV/BC version in the same machine.
How to handle this?

  • Manually copy the Server, RoleTailored and WebClient folders from the installation dvd:

ServiceTier\program files\Microsoft Dynamics NAV\140 to C:\Program Files\Microsoft Dynamics 365 Business Central\140_CU2

RoleTailoredClient\program files\Microsoft Dynamics NAV\140 to C:\Program Files\Microsoft Dynamics 365 Business Central\140_CU2

WebClient\Microsoft Dynamics NAV\140 to C:\Program Files\Microsoft Dynamics 365 Business Central\140_CU2

Powershell modules installation

Import-Module “C:\Program Files\Microsoft Dynamics 365 Business Central\140_RTM\Service\NAVAdminTool.ps1” -force

Version is 14.0.29530 so it is ok.

  • Now close Powershell ISE (it is mandatory), open it again and import BC SR CU2 modules instead.

Import-Module “C:\Program Files\Microsoft Dynamics 365 Business Central\140_CU2\Service\NAVAdminTool.ps1” -force

Version 14.0.29530 again. Ups, something went wrong! 🙂

This is happening because the BC module reads the BC Service path in Windows Registry.

In the Windows Registry I have:

So what do we need to do?

  • First, edit and change the module script.
  • Create a new entry for CU2 in Windows Registry
  • Close and reopen Powershell ISE. Import the module again and… voilá, version 14.0.34444 as expected

Now we’re able to create the BC service using Powershell command because the service will be created with the correct version.

Share this

7 Comments

  1. Hi,

    At first to say thank you for this post. It’s very helpful.
    I’ve passed trough all steps successfully and the result is as expected in this example. But, I’m struck at the final step when I need to create ServiceInstance. I’m creating instance using BusinessCentral Administration Shell, but even though the version in powerShell is right one (new CU) when service is created in Administration Tool again is old version.

    Any suggestions? 🙂

    • Hi Aleksandar,
      I’m glad that you have found the post helpful.
      Regarding your question, I didn’t tried to create a service instance using the Administration Shell. It seems that there must be other configuration, either in windows registry or in a powershell script, that may need to be changed. I would have to test that scenario.
      I suggest you to use ServiceTierAdministration Tool instead (https://bit.ly/2Umjh24).
      In this tool you can configure the different NST (NAV/BC Service Tier) versions you have in your machine and create new services/service instances using whatever version you want.
      Please let me know if you need help using the tool. I’ll be glad to help you with it.

  2. Hi Ricardo,

    I’ve installed ServiceTierAdministration Tool from the link, I’ve added BC server .exe file first in NST Version Settings as you say so after that I’m able to create new server instances for both versions without any problem. 😀
    Thank you for your help.

    • Hi Aleksandar,

      Thanks for your feedback. It was a pleasure to help you. I’m glad that you could install both BC versions in your machine.
      Any doubt, just let me know.

  3. Hi Ricardo,

    thank you for this post. Have you tried this approach in a customer installation? In a manner if it is stable enough to keep production service at old version and run test/develop service at the new one?

    Thank you, best regards
    Ondřej

    • Hi Ondřej,
      Thanks for your comment.
      This approach is more recommended to be used on your local machine, when you need to have multiple instances installed.
      It should work fine and be stable on the use case you describe as long as you are careful enough to do not mess up with the wrong BC instance.
      Nevertheless my recommendation would always be to have the Production environment running on a different server/vm other than the Dev/Test environments, to make sure that the BC instances running on the Production environment has its own resources and the dev/test instances don’t use them (cpu/ram and so on). Same would apply to the SQL Server. I would recommend to at least have the Production database running on a different SQL Server instance so you can assign more memory to the Production instance, for example.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.