This post is a summary of a couple different articles and forum posts I’ve read online. Essentially Microsoft Dynamics NAV 2013 and NAV 2013 R2 share some of the same
This post is a summary of a couple different articles and forum posts I’ve read online. Essentially Microsoft Dynamics NAV 2013 and NAV 2013 R2 share some of the same files and thus you have to tweak the installation of 2013 R2 a bit in order to still be able to run 2013 without issues.
To start, you need to make sure that your 2013 R2 installation is higher than build number 35850 (Microsoft KB 2907588 was the original fix/update to allow both installations to co-exist.).
Here’s the short list of the steps you need to take:
- Install NAV 2013 + SQL etc. (if you don’t already have it installed)
- Install NAV 2013 R2 (build level above 35850).
- Run the attached powershell script (NAVRegFix) as administrator.
This worked like a champ for me.
Our environment at the office is comprised of 5 developers working full time on NAV 2013 development. The developers all work locally and we use a combination of FogBugz, Kiln and an in-house tool we’ve built to manage the import/export of NAV objects into our source control tool as we work. I’ll write another article later on about how we are using Kiln with NAV for distributed source control but I can say that so far it’s been a huge success for us and allowed us to work on multiple features sometimes in the same area of the system without developers tromping all over each other.
Anyhow, we have a number of scenarios in the office that require us to quickly backup and restore various NAV databases running under SQL Server 2012. In earlier versions of NAV this would commonly be done via the Classic Client development environment using the NAV backup tools. We’ve found this to be slow and wanted something faster.
Note: As of NAV 2013 R2, the Classic Client method of NAV database backups isn’t even an option any longer!
Enter SQL Server 2012 Backup/Restore.
Pretty standard for people used to working with SQL Server and works just as well for NAV databases but figured I’d share a step-by-step all the same.
Prerequisites: You’re going to need to have SQL Server Management Studio installed on the machine that you’re using for this tutorial. In most cases this should be installed along with SQL Server 2012 but if that option was missed when doing your initial setup, you’ll need to either go back to your installation and modify it to include this toolset or alternatively, if you’re using SQL Server 2012 SP1 or greater, you can simply download the tools directly from the SQL Server 2012 SP1 Express download page. You simply need to select either of the following (depending on your platform):
- SQLManagementStudio_x64_ENU.exe (64-bit)
- SQLManagementStudio_x86_ENU.exe (32-bit)
SQL Server Database Backup
Step 1: Start up SQL Server Management Studio
In this example I’m logging in as the SQL Server Administrator account that was setup when I installed SQL Server 2012 since it’s on my development machine. You can also use a Windows account for the authentication method as long as that account has sufficient privileges in SQL Server to perform backup and restore operations on the databases you are working with.
Step 2: Select a Database for Backup
Expand the databases list and right click on the database you wish to backup. Select Tasks > Backup… from the list of options.
Step 3: Name Your Backup & Execute
Depending on what type of recovery model you are using, and if you are using a single backup set with multiple backups within it, you may need to adjust the default values on this screen. For this example, we are using the “Full” recovery method as opposed to a Transaction Log or Differential backup type.
Note: If you want to change the name or location of your backup file, you’ll need to remove the existing destination entry and then add one of your choosing as illustrated below.
Last but not least simply click “OK” to start the backup process.
That’s it! You’ve done it.
SQL Server Database Restore
Step 1: Choose a Backup to Restore
You need to be logged in to SQL Server Management Studio as a user with sufficient privileges to perform the restore operation on SQL Server. For this example we are again using the administrative user I setup when installing SQL Server on my machine.
Step 2: Change Database Options (if required)
Sometimes when you are restoring a database, you may wish to name it something other than what it was originally called. Perhaps you are cloning a customer or development database for some testing purposes or to work on a new project separate from other work. In order to do this you need to slightly adjust a few options on the database before you restore or otherwise you’ll run into conflicts. You should not restore a database on a SQL Server that already has a database with the same name as a general rule.
Choose the Device option, then click the build button “…” and navigate to where you’ve stored your SQL database backup.
Once you’ve selected a database backup to restore, now is the time to change the name of it if you need to. If you aren’t already running a database with the same name you can simply click “OK” here to start the restore process.
If you do need to change the name you can do this by changing the Database field under the Destination heading. We’ve used a new name of “Another Database NAV (7-1)” in this example.
Next, you’ll need to click on the Files page and change names of both the Data and Log files so that they are different than what is listed in this backup. If you don’t change these names as well, you’ll get an error when trying to restore the database.
As a general rule I always name these data and log files with the same name as my database.
Now that you’ve changed the name and respective data and log files, you can click “OK” and restore the database. The length of time required to restore the database will vary based on how large the original was and depending on the speed of your machine.
Anyways, hope this helps some folks out. Let me know if you’ve got any questions.
MSDN Source Links
For more thorough Microsoft based information on backup and restore of SQL Server databases, just hit up the MSDN article on this process here.
Found a good post we’ve implemented over on Greg Kaupp’s blog regarding improving the performance of the NAV Application Server and thus the responsiveness of the client machines. Simply put adjusting the size of the MetadataProviderCacheSize to a number exceeding the total number of objects within NAV (~5000 or so) will greatly enhance the performance of the NAS.
To update this for your instance of NAV you need to modify your CustomSettings.config file which should be located in the following spots:
NAV 2009 – C:\Program Files\Microsoft Dynamics NAV\60\Service\
NAV 2013 – C:\Program Files\Microsoft Dynamics NAV\70\Service\
Once you open the CustomSettings.config file, update the MetadataProviderCacheSize setting as depicted below.
And that’s it! Thanks again to Greg for posting this originally. His blog is loaded with tons of other useful tips and I encourage you to check it out at the source link below.
Read his full post here: Performance Tuning Microsoft Dynamics NAV 2009 and NAV 2013.
I was browsing the web and came across this article that states Physicists May Have Evidence Universe Is A Computer Simulation.
Wait, what? Like the Matrix?
Anyhow, just for fun I thought I’d throw this link up here.
Ever built a fusion reactor in your basement before?
Ok, neither have I.
Whenever I see something like this it really inspires me. There are some _brilliant_ people in this world and Will Jack certainly fits that bill as far as I’m concerned. Now 17 years old, Will has built his own IEC Fusion Reactor in his basement lab. Wow.
Anyways, I thoroughly enjoyed reading through this build and wanted to pass this along.
Read more at: IEC Fusion Reactor MK III « WJ Science and Engineering.
So this is my own little corner of the Internet…
I’ve wanted to put up a blog for quite some time but between books, projects, work or life, I hadn’t embarked on that quest until now. I hope to share a little bit of who I am, what interests me professionally and personally and also maybe learn a thing or two along the way.
Alright, what next? Maybe a little about who I am… yeah that’s it.
I’m currently a Software Development Manager for a large Canadian hardware retailer and I’m in the midst of managing the technical development and implementation of a full scale ERP project based on Microsoft Dynamics NAV 2013 and LSRetail. Suffice it to say that I’ve gained valuable experience throughout this process and I’ll be blogging about some of the pitfalls we’ve encountered along the way and how we overcame them as a team. We’ve still got a lot of work to do on this thing, so I’m sure some situational posts will go up in the coming months.
Other miscellaneous topics I’ll probably write about at length include IT Security, Mobility, Software Development and anything else that I think someone else might find interesting.
Umm, what else?
Yeah, I better stop. I realize this post is really weak. I get it. It’s my first one! It’ll get better. I promise.