Developers Speed Bump in NAV 2013 R2

NAV 2013 R2 is now multi tenant.  That means changes for the developer but not for the user.  This means that the application can be in one database and the company data in another.  One application can contain multiple companies in multiple databases.  This means that some of the administration tasks in the Developement Environment (old classic client) have been removed.


The whole File->Company section is moved into the Windows Client.  In the Windows Client the user can now create, delete and copy companies.  The Copy Company function is new and easy to use.  The permissions for the database table Company determines what the user is allowed to do, meaning that if a user has the permission to delete a record in the table Company that user will be able to delete the whole company and all its data.

Take a closer look at what this means on Mark’s new website.

Since the data can now reside in multiple databases and the Developement Environment only connects to the application database the Backup and Restore feature has been removed.  No more FBK files.  You will now use SQL or PowerShell to do backup and restore.  Take a look at Waldo’s website for details.  Microsoft is planning to supply a new and easy way for Backup and Restore as Mark has blogged about.

Both Mark and Kamil have supplied a scripted way to copy data from one company to another using SQL commands.  I published a NAV Report that created SQL commands to copy data.  This was prior to NAV 2013 R2 so I decided to update that report and republish here.  Some of the update was inspired by Kamil’s work – thanks Kamil.


First create an empty company and start this report.  The destination is based on the company and database running the Report.  Features are;

  • The user can lookup databases and companies in the request page
  • Uses Table Information to loop through tables.  If selected, only the company tables will be added to the script.  This is useful if using multi tenant
  • It is possible to create a script for a limited number of tables by filtering on the Table No. field
  • Checks fields for AutoIncrement property and adds required script lines
  • Checks if a table exists in the source database before adding it to the script
  • Checks if a field exists in the source table before adding it to the script
  • Uses “Convert identifiers” from both source and destination database to create script lines

I also use this to copy data from a live database to a developement database and between versions of NAV.  I hope this will help you over some of the speed bumps to save time.

Create Copy Script

Leave a Reply

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