Category Archives

Docker Series: Getting started

Yes, a blog about NAV/BC on Docker! “Docker” seems to be battling “VS Code” for the blockchain-status of the NAV/Business Central world. Everybody seems to be talking about it. I’ve been using it for about a year now, and rest assured, I’ve struggled. Multiple times. Often enough to share what I’ve learned.

The mere fact that you’re reading this probably means you either want to know if Docker is for you, or you want to know where to begin. Please don’t expect a full length step-by-step manual of everything there is to know about Docker; A lot has already been written by people who know much more about Docker than I do. I do intend to get you to the right information and add what’s missing in my opinion.

So let’s start with some important blog links:

Freddy Kristiansen – this guy is the heart of NAV on Docker at Microsoft. Has written so much about the subject that it’s sometimes difficult to find the right blog 🙂

Tobias Fenster – CTO at Axians Infoma, but seems to have fallen in love with Docker. In my opinion he knows just about everything there is to know about Docker, if you have a chance to visit one of his sessions, it’s worth it.

David Markus’ revelations about Docker – Cloud Architect at X-Talent, but also a Docker nerd. This link is not really a blog, but a presentation about Docker that’ll give you a clear overview of what Docker is and how it works, and will do so fast thanks to some neat navigation.

Do you need Docker?

Docker makes it possible to set up an isolated container with Business Central or NAV ready to go within minutes. The limiting factor is literally your internet connection, and you can run as much different versions alongside each other as you want.

If you regularly work on multiple NAV/Business Central on Premise databases, maybe even with different versions, and outside of a live environment, then yes, you do.

I run Docker for:

  • Development and automated testing of Business Central extensions, both for AppSource and on Premise environments;
  • Development of customizations for customers (I have a Cronus on the right version, extensions and localization for every customer);
  • Testing of functionality in different versions of NAV/BC

Docker can be used for much more than this, for example running various applications on live servers; I’m only focusing on NAV/BC consulting here.

Which version do I need?

Most “getting started with Docker” blogs will refer you to and tell you to download and install Docker. If you follow this advice, you end up here:

So which version do you need?!

If you already know what you’re installing on, it’s actually quite simple:

  • If you run Windows 10, choose Docker Desktop. You can click the link to download and install Docker on your system.
  • If you intend to run Docker off a Windows Server, you want Docker Enterprise. This cannot be installed from here, an install manual will appear here soon.

Do you have a choice?

Then the version you should get depends on what you want to do. Oversimplified, it’s like this:

  • Are you planning to run Docker for you personally? For example on a laptop? Then choose Windows 10 and get Docker Desktop. It’s free, and can do most of the stuff the enterprise version can too.
  • Do you want to share your development environment with other developers? Are you looking for a cloud-like experience when connecting to your NAV/BC? Do you have powerful hardware (6+ cores, 24GB+ RAM)? Then Docker Enterprise might be for you. In my experience, it’s more stable and scales better. The biggest disadvantage would be the higher cost.

What advantages does Docker have over running VMs?

Let’s imagine you’re running a laptop with a modern six core processor and 16GB of RAM. For Dynamics NAV 2018 or Business Central on premise development, you will need a stable and fast Windows 10 environment with Visual Studio Code, a browser, some Office programs etcetera. Okay, I sometimes also use finsql (with UI) and SQL Server Management Studio – some people call me old-fashioned 😉 For all this software you’ll need at least 8GB of RAM to run comfortable.

Then we’ll create one VM running the most recent Business Central on premise; you’ll need to install Windows 10 (or download a 12GB Windows image), probably you’ll want to run some updates, maybe install SQL Server, install Business Central (maybe including the demo database and SQL Server Express), setup the servicetier, configure the firewall to allow traffic into your machine and I’m probably forgetting a lot here.

How long will all this take? an hour at least. You’ll probably also want at least one dedicated core assigned to this machine, and at least 4GB of RAM to have something vaguely resembling “performance” out of this NAV setup.

Now let’s add customers on 4 different versions to the mix; you’ll either:

  • Need to create multiple VMs (in which case I’m hoping you made a copy of that freshly installed and updated Windows 10 VM earlier, before setting up NAV…), or;
  • Have to fiddle with your running installs to install a second version alongside the first one, at the risk of ending up with nothing working at all.

Let’s compare this to a Docker install: Admittedly, both Docker Desktop and Docker Enterprise took me a fair share of time to get going, but once you dó have it running, setting up a new development environment will take you one command and less than five minutes of waiting. Which is awesome!

Another gain of using Docker is the fact that it’s a lot less resource hungry than a VM. It is not only possible to run a fully functional developer’s Windows environment with 4 simultaneously running containers, it will return more than reasonable performance. If you’re a raw numbers person, David Markus did a test for his revelations on Docker presentation. The results:

Doesn’t it have any disadvantages?

Well, yes it does. Sometimes, Docker is just a bit of a motherDocker. Google is not always your friend here either; Googling Docker issues will also give you a lot of solutions that apply only to Linux containers and/or Docker running on Linux, and solutions for problems that work only on *insert older, newer or different version of Windows*.

You will probably learn a good bit about networking, but it’s well worth it. And concerning Google, I hope this blog series will be part of the solution.

Let’s get this party started!

We’ve moved, and more!

You won’t find our office in Gouda anymore, our new address is:

Dynamics Tailor B.V.
Essebaan 17C
Office 2.02
2908 LJ Capelle aan den IJssel

Of course, there’s more news, and that’s in the “we”:

As of this month, I’m part of a team!

Soon, you’ll find more info here on where to leave your support questions.

An unknown language was selected (8192)

Yet another blog that was inspired by a phone call: Yesterday, a “new” Dynamics NAV (AL) developer who had to venture into good old C/Side called me about getting an error message when starting the program.

“An unknown language was selected (8192).” came up right after clicking the icon, after which the program would close.

Since it took me a while to remember what it meant, I decided to put it in a quick blog, for once and for all.

Let’s keep it short: This message doesn’t have much to do with your Dynamics NAV setup. It’s very easy to cause, and also very easy to fix, and has to do with Windows regional settings (being a mix of English and Dutch, but this might also happen with other languages).

The solutions is in Control Panel > Region:

Change this setting to something more usual, and you’re done:

After this, your development environment will work again.

Lost In Extensions: SQL migration & Modern Development

After having a fairly smooth Friday, I was in my car driving to pick up my son when a migration consultant (let’s just call him Mike) called about a mutual customer. Mike told me something I don’t want to hear on Friday around 17:30:

We’ve just ran another conversion to prepare for testing next week, but somehow we’re missing records in the Item table. About 300, to be exact. It looks as if the service tier isn’t refreshing.

After discussing the problem for a while, and not figuring out what was going on, I promised to take a look after the usual family business. I just did.

At this customer we periodically migrate data from the old live environment to the acceptation environment (using SQL): some tables are wiped every run, but for performance reasons, others are migrated through incremental updates.

So I logged in, restarted all services and then had a quick look in the client. With a filter on our item, it returned an empty list – no other filters on the table, so the item clearly didn’t exist. So I tried to create it… and NAV told me that it already existed!

Right. Next to check were the usual things that go wrong when doing SQL conversions: low caps in code fields, dates or times with the wrong value etcetera (even though the behaviour of the client didn’t match up). As expected, there was nothing “off” visually.

Not wanting to waste time, I decided to run a trace, and quickly found out what was going on:

A few weeks ago, I built an extension containing a TableExtension object that extends the Item table, so now we have two Item tables:

  • The main table: CRONUZ_EU$Item
  • The companion table(s): CRONUZ_EU$Item$[random GUID]

The NAV/BC engine always generates it’s SQL statements with the included companion table, so there will never be a record in one of the companion tables that’s not in the main table, nor will the opposite situation exist.

Mikes original procedures update the CRONUZ_EU$Item table, but not the companion tables. However, the NAV/BC engines generates a SQL statement with a JOIN, not an OUTER JOIN. The result: SQL will return records only if a record with given primary key is found in both tables.

After adding all the missing records, of course, the problem was solved immediately. However, uninstalling the app with option -DoNotSaveData might also help.

The licensing issue: Christmas present from Microsoft

It’s that time of year again! December, one of the busiest months of the year. Everybody is trying to achieve targets, finish some projects and grab a bonus, all while decorating their homes, shopping for Christmas trees and writing postcards for friends & family.

Microsoft chose exactly this time to secretly slip us an early gift. Almost nobody noticed. 

One of my customers is currently running Dynamics NAV 2018 with a number of C/Side customizations. We’ve already cleaned a lot of stock objects by switching to events; Next step forward into the future is the switch from C/AL to AL, and I managed to convince them that next year, Extensions are the way to go!

In order to prepare for this, I started refactoring and componentizing older customizations, so they can become independent extensions which can be switched on and off as required. While doing so I ran into a “little” problem:

What it says, is that the license doesn’t allow object LocationCardExt to be published, because the Page Extension needs a free object in the licensed range. I had the same error on my Table Extensions. So here I was, at a customer who have used their license right up to the latest object in the custom range, planning to move custom fields from – for example – the Sales and Purchase tables, to multiple extensions.

36-37-38-39-110-111-112-113-114-115-5107-5108: Only the Sales Objects would be 12 tables, so if I would have to build 5 custom extensions, this would result in 60 additional objects. Probably, at least half of those tables have modifications on two pages (a card and a list), so I’d need 90 pages and this is ONLY sales – €10K in extra objects would be easily spent.

Well, fuck. Excuse my French, but this is quite inconvenient to say the least. I silently panicked and contacted Arend-Jan (one of the three wise men).

And I got lucky! He pointed me to a document on object ranges in Business Central which also has a passage about Dynamics NAV 2018:

When implemented with Dynamics NAV 2018 or Dynamics 365 Business Central On-Premise, partner hosted or Azure IAAS:

The classic C/AL objects in this range needs to be purchased from the Dynamics Pricelist when implemented on premise, partner hosted or Azure IAAS. They are developed in the traditional way using C/Side.

New from Business Central Fall 2018 Cumulative Update 1 (planned for November) and NAV 2018 CU 12 (planned for December)

The AL extension (PageExtension, TableExtension) objects developed in Visual Studio Code and stored in the 50.000 – 99.999 range which extends objects to which you have modify permissions in your development license are free of charge. (For ex. When you want to extend the Customer table from the base app, you are required to develop an extension object and assign a unique object ID to it).Regular AL objects (Table, page, codeunit, report,…) needs to be purchased through Dynamics pricelist.

Yes, you read that right: Microsoft said “free of charge”!

From Business Central Fall 2018 CU1 and Dynamics NAV 2018 CU12, it’s possible to use the full 50.000-99.999 range for these Page Extensions and Table Extensions, so it looks as if it will solve this problem. 

In other news: Cumulative Update 12 for Microsoft Dynamics NAV 2018 has been released.  Today.

This blog does come with a little warning: At the time of writing this, I couldn’t find a docker image for NAV 2018 CU12 yet, but as soon as I have the chance I’ll test with a couple of different licenses, and report back here exactly what is possible and what isn’t.

For now: An early Merry Christmas to all of you!

Escaping the transaction scope (and other good reasons for beer)

Yes, beer! It’s friday evening and we’re celebrating. The Dynamics Tailor, last years three day decision of becoming an entrepeneur, is still alive and kicking!
Yes, the first anniversary of The Dynamics Tailor has passed, last Wednesday to be exact.

So what happened this year? A lot! We’ve managed to pull a number of businesses into a recent version of Dynamics NAV, worked on extensions, and I’ve also had some security puzzles in one of my projects. Currently, I’m working on a re-implementation, a customization project and working as interim application manager.

I haven’t had large failures, and I’ve learned a lot: I’m looking forward to next year!

Escaping the transaction scope

This week, I had another customization request that was not so easy to fix:

“During sales order release, sales shipment and warehouse shipment, we want to perform a number of extra validations. If one of these validations fails, all changes should be rolled back. However, can we catch all validation errors (also the stock ones), and log them into a table, so process owners can either fix the issue or decide whether the custom validation can be ignored (approve the order)?

It sounds a lot easier than it is: I didn’t want to modify any stock code (the customer is using NAV 2018, we can’t fully switch to extension yet, but we want to build all customizations ready to be converted in the future).
In this situation, I didn’t have a choice except somehow saving records after the transaction is started, but before an error is thrown, since then I would only be able to get the last error (text). And that’s easier said than done!
As you probably already know, Business Central starts a transaction after the first write command (INSERT, MODIFY, RENAME, DELETE), and performs a COMMIT either when execution ends, or when you force the program to perform a COMMIT.

Putting a COMMIT in between would solve the problem, but will probably give me 15 new problems: It might cause inconsistent data. I’ve always been very careful with COMMIT, but since we’ve started using events and developing extensions, I’ve basically stopped using them altogether, unless in completely isolated code. It’s simply too dangerous when you cannot control exactly what’s happening before your COMMIT is being executed.

Actually, the solution would be to simply keep my error log transaction out of the transaction scope; the whole post transaction will then be rollbacked when an error occurs, but my log would still be saved. Dynamics NAV and Business Central provide an expensive, but functional solution, and this is how to code it:

STARTSESSION(VAR SessionID, CODEUNIT::"MyValidationHandler" ,COMPANYNAME ,ValidationLogRecord);

Start session runs a codeunit in a separate non-GUI session, and therefore is out of the scope of your current transaction. I prepared my record before I passed it to the new session, and it’s only written in a new session if an error is expected; this in order to keep the session open as short as possible, and run as little session as necessary.

Also, I timed the duration of this process, calling a codeunit that simply performs a Record.INSERT(TRUE); and then closes the session. It clocked in at 13 ms on a slow development server – not fast, but acceptable for something that only occurs a few times a day.
Good to know is that performing a STARTSESSION will not cause you to use an extra licensed user – the session is started from the same system and with the same named user, so it doesn’t count.

Again: It’s expensive, but it solves the problem!

Presenting at a Dutch Dynamics Community event!


Today, I had the honor to present for the first time in a long while, at a Dutch Dynamics Community event in Woerden.

I’m still too hyped to sleep, so here’s a little summary on what happened, and another promise kept.

Presenting to an audience that’s probably far more experienced than I am is quite far out of my comfort zone, so I was seriously nervous! And making matters worse, I had to do the same session twice. To cut a long story short, I don’t think I made an impression as relaxed as this guy…

…but eventually, I did have a good time, and hope I managed to inspire some people to start using the discussed technology.

A short summary of the session (in Dutch, sorry!):

8. Hoe up-to-date zijn jouw developmentkennis en -vaardigheden?
Spreker: Kevin O’Garro (Freelance Dynamics NAV Specialist)
Tags: Technisch, NAV

Bij diverse projecten, waar ik de afgelopen maanden betrokken was, viel me op dat er nog weinig met moderne technieken gewerkt wordt, die eigenlijk zo nieuw al niet meer zijn. Ik doel dan op zaken als events, delta-merges, en test automation.

In deze sessie wil ik een update geven van deze “nieuwe” technieken en laten zien hoe eenvoudig ze toegepast kunnen worden. En natuurlijk wil ik met jullie in gesprek komen hoe je dit zelf vrij makkelijk kunt oppakken. Niet alleen in nieuwe projecten, maar ook in oude.

To motivate my choice of subject: I’ve had to force myself a number of times to prevent lapsing into old habits and stay innovative. As a software consultant or developer, it’s sometimes difficult to force yourself to investigate new technology thorough enough to use it in projects. I’m relatively young (in my thirties), and a quick learner – most probably there are a lot of developers who struggle even more, or have stopped trying?
Since there’s quite a lot to benefit from newer technology, my presentation is a small recap of what has been pioneered by people like Waldo, Luc van Vugt, Arend-Jan Kaufmann, Vjekoslav Babic and a lot of other NAV enthusiasts/specialists/MVPs.
This in order to try to tickle the curiosity of my audience.

In the end of my 2nd session, we went a little bit out of scope, and had a look at what’s possible when you strictly follow coding guidelines and use tools already available: we converted NAV2016 customizations into AL code, which can be compiled as a V2 Extension in Visual Studio Code!

Maybe it’s the adrenaline, but I really had an awesome evening.

To my guests: Thanks for not only listening, but also engaging!

Last but not least, you can find a (slightly modified version of the) presentation here, including generated objects & files, extra links and a remark that came up during the second session:

Download the presentation (PDF)

Download the demo files (ZIP)

Downloading the ZIP might cause your antivirus to protest a little. This is caused by the fact that the file contains a PowerShell script and a .cmd-file: Nothing to worry about, it’s part of the session.

PS: Thanks to Dutch Dynamics Community for the opportunity!

Me, demonstrating something about an ancient version of Dynamics NAV
Above: Me, demonstrating something about an ancient version of Dynamics NAV. Image by Vincent van Rens for Dutch Dynamics Community.

Dynamics NAV 2017 & Application Areas

Recently, I was working on a Dynamics NAV 2017 implementation at a customer, when I noticed a lot of the customizations were suddenly not visible. It took me a while to figure out what had happened; when I checked the Company Information page I found Application Area Experience set to “Basic”.

Microsoft rightfully removed the button from newer on-premise versions (it’s only visible when in a SaaS environment on 2018), because I’m sure a lot of people have made this mistake (there’s even a few MVP’s that have blogged about this!).

The culprit was the project responsible; he had been fiddling around through the administration menus and accidentally changed this option, thinking he could always change it back (WRONG!).

Employees at this company do have a sense of humour, and I got a little carried away on blocking the functionality…

If this happens to you, it’s quite easy to fix: Open table 9178 Application Area Setup, remove the record, and all is back to normal.

Efficiency in E-Commerce & the story of my feet

Due to the time-consuming nature of translating, this item is only available in English.

Before anybody asks: EU 49, UK 14.5. This blog is as much about my personal frustration (of crappy webshops, not being able to find a decent variety of shoes, and more), as it is about recent developments in our E-Commerce world.

The past few years, parcel services have been all over the news in the Netherlands: We had news about the volume of delivery traffic causing traffic jams in our cities, PostNL (our oldest parcel service) has been getting rid of as much payroll as possible and started to hire independent parcel runners, and recently there’s been a lot of criticism on how little these “entrepeneurs” get paid.

Alongside at least monthly news about a rapidly changing parcel world, there has been a steady flow of smaller news outlets pointing at another huge disadvantage of our growing E-Commerce market: Less large deliveries to stores means more small deliveries. Result: Our urban traffic jams are growing year-over-year, and our environment is suffering.

You can imagine my surprise when I heard this news in the morning. In short: Kitty Koelemeijer (of Nyenrode Business University) states that crossborder parcel services are too expensive, and E-Commerce could be stimulated by causing more transparency in the sector in order to apply market pressure to the rates – on a total of 370 billion euro per year, the consumer could save up to 12 billion per year in parcel costs.

I bought new shoes this week, and men who share my shoe size will probably know this is not an easy thing to do. Yes, we have a few shops in Rotterdam that go up to 50/51, yet I never feel like going there: Prices are fairly steep and there’s a maximum of two brands and four pairs to choose from. A total waste of my time. No, I buy my shoes online, where it’s quick and simple. Two or three pairs at once, and I know exáctly where to go. The choice in brands is still disappointing – heck, I even tried personally stalking Guillaume Philibert in order to obtain a pair of his nice Filling Pieces in a size made for real men – but hey, I manage to put something on my feet.

So I started thinking: What’s important to me when I buy these shoes? Would this measly 3 percent discount make me buy quicker or add an extra pair? Don’t think so. Would it have for other fairly recent orders? Not at all. So why do I buy where I buy?

Because of this:

  • Availability. Shoes in my size are hard to find, some other stuff I order is only available through a few specific webshops.
  • Speed. I want my stuff and I prefer to have it yesterday. Now is also fine, try not to make it tomorrow.
  • Accuracy. I want to order what I need. My hate for having to use returns processes exceeds my hate for the sum of my hate for highway gas station toilets, biking to work in the rain, empty phone batteries and unspecified syntax error messages.
  • Ease. I don’t have much time. Don’t make me login: Take my zipcode + house no. and my e-mail, make me pay, and let’s get it over with.
  • Trust. If I order, I want to be sure I get my stuff on time. Oh, and I prefer being sure I actually get my stuff, too.
  • Price. I want to buy for cheap, but only after the requirements above are met.

You’ll probably be saying “these are YOUR preferences, YOU don’t represent the whole European market!” by now.

However, I feel I’m quite close to an average customer. The two companies I’ve had the best experience with in the past year were CoolBlue and Bax Music – both are showing turnover growth that’s near insane, and both are winners in very difficult markets.


Let’s look up some E-Commerce numbers. I recently found an article about the average turnover per order in the EU somewhere, and although I cannot reproduce it now, I’ve found some stats from the US: The average E-Commerce order value there is around 80 US dollars, and it has been around this mark since 2012.

Finnish PostNord has had their marketing department make up a wonderful 44-page analysis of the European E-Commerce market in 2014, which gives us even more valuable information: Clothing and footwear were the number 1 product, keeping books (2) and home electronics (3) on a safe distance. And although clothes and footwear have a large advantage in the fact that they barely ever break in the mail, they nearly always have to fit.

One of the bigger players in E-Commerce in the Netherlands is Zalando. The managing director of Zalando, Rubin Ritter, has once told Die Welt that the amount of returns of Zalando is around the 50% mark. FIFTY percent. Zalando is quite transparent – their annual report is easily found through Google, and it shows their fulfilment cost ratio is 25.9%. How much of their revenue is being spent on returns? 10%?

Let’s not jump to conclusions right now – I’m an ERP Specialist, not an E-Commerce consultant, so you won’t hear me shouting that reducing returns is the holy grail of E-Commerce. However, the facts I found show that a lot of resources are going to waste to facilitate returns. From my personal experience, I’ve learned that I keep coming back to webshops that manage to get me exactly what I want, where and when I want it, not to the webshops who have the best returns strategy.

My two cents: The technology to get to know your customer already exists. You can have your customer return, instead of your product.

A Dynamics NAV database… on a Linux server?

Let’s go ahead and admit it: I just have a thing for open source software. FreeBSD and Ubuntu Linux really tickle my fancy. Free, lightweight, fully customizable, versatile, yet world-renowned for stability. This “thing” used to be totally useless when your daily work is all about Microsoft. Recently, things have changed… Because Microsoft released SQL Server 2017 for Linux!

Probably, you’re already wondering why I wrote this article, or even why I tried running SQL Server on Linux. Yes, I know, who cares about on premise installations since we have Azure and Docker?

Don’t ask me “why”, but I just had to give it a go: A Dynamics NAV 2018 database, on Microsoft SQL Server, on Linux. Two (or three?) worlds working together in peace. It’s happening! And if this isn’t enough motivation, well, then there’s always this little beauty:

  • Because we can! *evil laugh*

Step 1: Setting up the Linux Server

If your world is entirely made up out of Microsoft, setting up a Linux Server doesn’t seem the most straightforward thing to do. But actually, it is, so here’s a (detailed but quick) crash course for installing a Ubuntu Linux Server:

  • Go to this link to download Ubuntu Server. Unless you need cutting edge functionality, download the LTS version. Like with Windows Server editions, this release has Long Term Support (five years), so if you keep this Linux Server running you’ll be happy until 21.04 (for the 16.04 version).
  • If you’re planning to run Ubuntu on a physical machine, google “unetbootin” (it’s somewhere on SourceForge) to quickly copy the image you just downloaded to a USB stick + make it bootable.
  • If you’re running a hypervisor (Hyper-V or VMWare for example), just mount the Ubuntu image on a new system and run it. Concerning resources, I’d start with 3GB RAM and 2 cores if you’re limited – Ubuntu Server doesn’t have a GUI and is very lightweight out of the box.
  • You’ll find the setup is very straightforward. By the way, I usually skip keyboard detection and just select “US International”.
  • Go easy on yourself: Install “SSH” right from the setup tool. This is your “Remote Desktop Connection” for Linux. Slight difference: Your Linux has no GUI, so this is a tool to access the command prompt. If you already skipped through the screen that gives you this option: No problem, you can do it afterwards from the command prompt.

So, probably you’re looking at an installed Linux Server with a login-prompt now. After you login it’ll probably tell you it needs some updates. You can easily install these updates by running the tool to do so as administrator with the following command:

sudo apt-get upgrade

After entering this, you will have to enter your password again. “sudo” means “superuser do”, which is equal to running stuff as administrator in Windows. The rest is not important now. Fun fact: Unless you’re very unlucky, you won’t have to reboot the machine after the updates have installed…

If you forgot to install SSH earlier, just run this command to get that settled:

sudo apt-get install -y openssh-server

Last time I did this manually is a while ago but it should work right after installation.

Step 2: Tools to access the machine from your Windows box

To make our Linux-box with SSH useable from outside, we need two tools:

  • PuTTY: Use this to access the command prompt from your Windows machine. You can run ifconfig (with an F instead of a P) from the command prompt to see the IP address of your Linux machine.
  • WinSCP: Convenient tool which looks like a mix between Windows Explorer and good old Norton Commander, but allows you to access files on your Linux machine over the SSH connection. (yes there’s also Bitvise SSH, this is personal preference)

Step 3: Installing Microsoft SQL Server on Linux

This is where the mixing starts. Let’s first tell Ubuntu where to get SQL Server, by running the following commands (either through PuTTY or directly on the prompt):

wget -qO- | sudo apt-key add –

sudo add-apt-repository “$(wget -qO-”

sudo apt-get update

Background info: Ubuntu Linux has a “Store”, just like Windows. What we did here is: add the Microsoft encryption key to the system (so it trusts Microsoft’s repository), add the repository to the list of repositories in Ubuntu, and then get information on available packages for the system. Next commands:

sudo apt-get install -y mssql-server

sudo /opt/mssql/bin/mssql-conf setup

These last steps will look different than usual, but probably be very familiar once you see what is being asked. Let’s keep it simple, and also open up port 1433 for all incoming connections in the firewall:

sudo ufw allow 1433/tcp

Congratulations: You’ve just installed and setup SQL Server on your Linux machine!

Step 4: Preparing your database

If all went well, you should now have a running SQL Server, and you should be able to login to the server from your workstation using Microsoft SQL Server Management Studio.

The folder structure is a little different in Linux, but if you copy an SQL backup to your server through WinSCP, you can locate it in SSMS:


Once the database is there, you should be able to connect through the classic “Development Environment”.

Step 5: Connecting the Microsoft Dynamics NAV Service Tier

But suddenly, setting up the Dynamics NAV Service Tier is not so straightforward.

Yes, you probably already noticed this in step 3 and 4: SQL Server Authentication is back. Not a good thing in my opinion, but the Linux machine is simply not a domain member and we’ll have to live with this for now.

The difficulty on using SQL Server Authentication in the Dynamics NAV service tier is in the fact that you’ll need an encryption key to secure traffic between the service tier and the database server: Normally this is handled by the domain. For production environments I’d always use a certificate provided by an official authority, but if you’re simply testing stuff I’d say use makecert.exe to generate one yourself.

After generating the certificate, you’ll need to install this to the service tier. Ashwini Tripathi has written a very helpful blog on how to get this running. Here’s another Dynamics NAV Administration (Power)shell shortcut:

$Credential = (New-Object PSCredential -ArgumentList ‘sa’,(ConvertTo-SecureString -AsPlainText -Force ‘MYPASSWORD’))

Import-NAVEncryptionKey -ApplicationDatabaseServer LINUXSERVERHOSTNAME -ApplicationDatabaseCredentials $Credential -ApplicationDatabaseName DATABASENAME -KeyPath ‘KEYPATH.key’ -Force

Where all the caps need to replaced with your values, of course.

Step 6: Enjoy!

After completing these steps, your Dynamics NAV clients and even the classic development environment should now be able to start on the Linux database server:

For now, I’ll be using this database server to do some development on 2018 and possibly also on 2013; if I have any news on this, you’ll read it here.

If you have any issues, questions or remarks, let me know!

Page 1 of 212