What Version of Microsoft Dynamics NAV Should I Use for This Database?
Suppose you are walking down the street, a stranger quietly trades briefcases with you, and your new briefcase contains a Microsoft Dynamics NAV database inside of a SQL backup. The stranger slips off into the foggy night. This sort of thing happens to me all of the time, and then I am left with this database that I know nothing about. What version of NAV do I use to access it?
Rather than trying all of the NAV versions you have installed and clicking through all of the “would you like to upgrade” prompts, there is a better way to figure it out using SQL.
You are probably asking yourself, “Why not just ask the customer what version of NAV they are using?” Excellent point, but sometimes they don’t know, or they aren’t specific enough (2009 something). I find I have this issue when we are taking on a new customer that already has NAV installed. They ship us an external disk brick with the database, but we don’t have VPN access yet, so I can’t check the exact build number.
Besides – we get to use SQL to figure it out, and that is cool.
There have been a few blog articles posted about this topic in the past, but most of them were asking if there is a way to downgrade a NAV database after a user accidentally pointed a newer client at that database, and then did an upgrade. I’m not going to talk about forced downgrading, since that is a very bad idea – we’re just going to focus on figuring out which NAV client version you should use.
First, restore the database into SQL.
Using SQL Server Management Studio, open a new query window for this database.
Then run this cool little query:
select [databaseversionno] from [$ndo$dbproperty]
The table $ndo$property has some useful information in it…NONE OF WHICH YOU SHOULD EVER, EVER CHANGE unless you want to quickly and efficiently make NAV not work anymore. I do not know the specifics of what some fields are, like chartable or shadowpwd, but if you have database-specific licensing enabled, this table is where the NAV flf license file is stored.
We are interested in the field [databaseversionno]. This contains and integer that can be mapped to the specific version of NAV client. I do not have a complete list, but I was able to piece this together with some internet searching and by running this query against every database I currently have available. If you know of a version integer that I haven’t listed, please let me know and I’ll update this list. I have not included beta versions.
2.60A, 2.60B, 2.60C
2.60D, 2.60E, 2.60F
3.01, 3.01A, 3.01B
3.70 Hotfix 5
3.70 Hotfix 12
5.0 SP1 CU1
5.0 SP1 CU2
2009R2 build 32012
2009R2 build 35179
2013 build 36919
2013R2 build 37221
2015 build 38798
2015 build 40938
2016 build 42815
Table 1. Database version field mapped to NAV version number.
The blog article, Version Check from DynamicsUser.net forums, has lots of detail on the early versions of SQL-capable NAV and what the various database schema changes were.
Wasn’t that a lot simpler that hacking your way through hundreds of NAV client builds until you guessed the correct one? And you got to use your SQL-fu.
If you have any qestions about this topic or other development issues, contact ArcherPoint.
If you are interested in NAV development, check out our collection of NAV Development Blogs.
For step-by-step instructions on how to perform specific tasks in Microsoft Dynamics NAV, see our collection of How-To blogs.