I am upgrading a solution from NAV 2009 to NAV 2013. The solution was running in the Role Tailored Client only so the upgrade process was fast and easy.
I wanted to move this customized solution to another database and remove all other customizations from the database. On the other hand I am upgrading everything in the old database except this customized solution with the standard methods.
After I had the solution upgraded and the new database ready I started to think about how I would get the data from the old database. It is a significant amount of data so I wanted to use the native sql commands to do this. Since I had around one hundred tables I felt it would not be practical to copy manually nor to create the copy script manually.
So, I created a batch report. The batch creates an INSERT INTO and SELECT FROM query that is very fast. It requires the tables to be identical in both databases.
This batch will create a copy script that runs fast…
Few things I had to check. When copying Blob fields from NAV 2009 to NAV 2013 I needed to change the Compressed property to No. I also needed to check the fields to make sure that fields with AutoIncrement property set to Yes would not be included in the script.
I started with a NAV 2009 batch that is basically raw. I made the NAV 2013 batch smarter with direct connection to the sql server.