Skip to main content

NAV 2013 R2 - Cannot import the data because the database schema in the database is different from the schema for the data that you want to import.

Hi all,

Some time before we discussed about Import and Export Functionality with and without multitenacy in NAV 2013 R2. The Feature was released with Cumulative Update 8 for NAV 2013 R2.

The Process of Exporting and Importing data between databases was fast (i would say) from Legacy Backup of Classic Client, but still there are some flaws which i hope will be removed by Microsoft in New Cumulative Updates or in New Release.

For the Details of Steps how to Export and Import you can refer the blog article here.




Now Let's discuss the issue.

While Exporting and Importing Data between databases as per Microsoft the Database Schema should be same. Initially i thought it just about the Object in the database that they should be same and consistent between two database (Not only tables but all objects).

But While trying to do it in a customized database (Which was upgraded) export import functionality i ended up with an Issue in Database Schema.

After Reading the article about issue resolution What i understand is -

In Case of a Upgraded Database we also need to remove the Old Virtual Table Snapshots from the Database.

How to Do That?

This can be done with the Below Query in SQL. (Thanks Gunnar for same)

------------------------------------------------------------------------------------------------------------
#Author  - Gunnar Gestsson
#Replace - <<Source Database>> with Database Name from where we want to Export.

Delete from [<<Source Database>>].[dbo].[Object Metadata Snapshot] Where [Object ID] IN
(2000000007, 2000000026, 2000000049, 2000000101, 2000000102, 2000000103, 2000000020, 2000000055, 2000000009, 2000000029, 2000000038, 2000000058, 2000000041, 2000000028, 2000000063, 2000000022, 2000000048, 2000000040, 2000000043, 2000000044, 2000000039, 2000000045)
------------------------------------------------------------------------------------------------------------

Now Export the Data and Import the Data in New Database with Same Object Set. I should Work.

I would like to Thanks Gunnar Gestsson for the Nice Post.

Please Read the Gunnar Article Here.

Regards,
Saurav Dhyani
saurav-nav.blogspot.com

Comments

Popular posts from this blog

Send Mail with Attachment From Navision.

Hi all, We have seen how to save a report into PDF and how to send mail to a customer. Let's link these two post in one i.e. Mailing statement to a customer into PDF Format. This article is part of the Series. Please Refer  Table of Content here . If you have the old objects set let me brief you what I will be changing - 

Error After Restore SQL Backup of NAV 2013 Database

Hi all, we are facing a conman issue during restoring a SQL Database backup restored for NAV 2013. While Trying to run object from Object Designer we get below listed error (even the service is configured properly) - --------------------------- Microsoft Dynamics NAV Development Environment --------------------------- There are no NAV Server instances available for this database. You must ensure that a NAV Server instance is running and is configured to use the database before you perform this activity. --------------------------- OK    ---------------------------

Future - What Next After NAV 2016. Code Name - Madeira...

Hi All, While Browsing web I came across some article which says about next release of Microsoft Dynamics NAV. Let's see the History of Code Names Given to Previous Version  - NAV 2013 - Code Name 'Sicily' NAV 2015 - Code Name 'CRETE' NAV 2016 - Code Name 'CORFU' And as we all know that all these are the Islands.