We recently updated our SPA agreement with Microsoft, and after signing the agreement, we were able to download brand new development license with extended expiration date, which is always nice.
Our customer development databases have always File/Database/Alter, Integration, "Save license in database" set within the Development environment. This ensures that if you happen to have different NAV versions in the same database server, you will not accidentally use a license from another NAV version when you are developing new interesting features to your customers.
I started updating the development licenses to databases, and almost all environments that were older than 2018 went as nicely as expected. One NAV version however gave the error twice, and after installing the new license I still kept receiving the error, this time only once though. The reason appeared to be that someone (ehm, probably me) had replaced Cronus.flf with our old development license. This was easily fixed by copying the Cronus.flf back to its right place
In the old days you could achieve the same thing with "Export license" functionality in Development environment (and probably unintentionally replaced your Cronus.flf with whatever license happened to be installed on the SQL server). Luckily Microsoft has since removed the unneccessary buttons from the License view, and there is nowadays only Upload and Change buttons visible.
But then, first NAV 2018 database and upload new license, and the expire error did not disappear. I was baffled, and checked the Alter database section, everything was fine there, Save license in database set as usual, but the error still kept appearing. Next I checked the Master database, there was the usual $ndo$srvproperty table, but there was an entry with some license binary. It seems like NAV checks first the Client folder, then Master database for license, and only after that the NAV database for license.Ok, I deleted the record, it was the old license anyways. Boy, was that a mistake. Next error I received was a bit more serious:
---------------------------Microsoft Dynamics NAV Development Environment---------------------------The NAV2018_CU06 database on the DEVNAVSQL2017 server does not contain Microsoft Dynamics NAV Development Environment system objects and cannot be opened.---------------------------OK ---------------------------
Microsoft Dynamics NAV Development Environment
The NAV2018_CU06 database on the DEVNAVSQL2017 server does not contain Microsoft Dynamics NAV Development Environment system objects and cannot be opened.
What? did I break it for good?
Not a single one database on that server agreed with me after that. At this point I started sweating a bit (well, it is unusually warm in Finland this summer), and continued investigations. I remembered that I had seen something with $ndo$srvproperty table earlier, and checked my old blogs. I found the blog, but that did not help much. I could not connect the Development environment to upload the license to database this time.
Finally, I took a backup of the Master database, and deleted the whole $ndo$srvproperty table from Master, tried reconnecting and phew! It worked.
The moral of the story? NAV sometimes stores license to Master database even when it is not supposed to, and if that happens, you have to delete the $ndo$srvproperty table in order to recreate it next time you connect Development environment to that SQL server.
For those who wonder where NAV stores the license if License per database option is set, it is located in NAV_Database/$ndo$dbproperty table, license field.
Edit: Fix some typoes