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

VIEW SERVER STATE permission on SQL Server?

Hi all, Sometime While trying to Login into a database we face an error message as shown below. --------------------------- Microsoft Dynamics NAV Classic --------------------------- You cannot start Microsoft Dynamics NAV Classic because you do not have the VIEW SERVER STATE permission on SQL Server. Contact your system administrator. --------------------------- OK    ---------------------------

BC 21 and Higher - PowerShell Cmdlet (Replacement of Business Central Administration).

Hi Readers, As discussed in last article about deprecating of Business Central Administration, there are few common actions that we use in administration till Business Central 20. For our on-prem customers, we will still require doing activities. As Microsoft suggest we need to start using PowerShell cmdlet.    Let's see how to do those via PowerShell, or Administration Shell. I will be keep adding commands as you comment to this article.

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 -