Skip to main content

NAV 2013 R2 Synchronization Paradigm.

Dear All,

Below are some extracts of the article published in Microsoft Team Blog about

"The New Table Synchronization Paradigm in Microsoft Dynamics NAV 2013 R2".

It start's explaining the History, how it used to happen in NAV 2009 /  NAV 2013-

Microsoft Dynamics NAV 2009 / Microsoft Dynamics NAV 2013 


When we import/compile an object in C/SIDE, system checks the object Metadata Version and Compare with Current Version. If the Current Version is New it updates the Object Metadata in Navision and Schema changes are directly applied to SQL Server.

So before NAV 2013 R2, everything used to get updated directly from Classic Client and at the time when we used to process.

At most the only issue we used to have was “The Object Metadata does not exist. Identification and values … “ when running the Microsoft Dynamics NAV Windows client.

Which used to be resolved just by recompiling the Objects specified in error or all the objects or deleting the metadata of that object and re-creating it.



With NAV 2013 R2 a new concept have been coined by Microsoft (i.e Multitenancy) which change the above approach of synchronize changes to SQL.

From a development perspective, this means that any modification that are made to a table object in C/SIDE are NOT DIRECTLY applied to the SQL Server structure but there is a need of performing a secondary action to apply and made persistent these modification at SQL Server side: this process is called Synchronization.

Microsoft Dynamics NAV 2013 R2

SCENARIO 1: 
Single-tenancy / Legacy mode 
“Prevent data loss from table changes” = Yes (default):

1. At object import/compile, C/SIDE checks the Object Metadata version in working memory and compares it to the version in Object Metadata table to decide if and what kind of change is made. 
(Same as in Microsoft Dynamics NAV 2009 and Microsoft Dynamics NAV 2013)

2. C/SIDE then CALLS THE Microsoft Dynamics NAV Server to check for breaking schema changes in SQL Server structure.
If C/SIDE is unable to call the Microsoft Dynamics NAV Server or if a breaking schema change is attempted (action that cannot performed due to the current SQL Server structure such as deleting a field containing data): a C/SIDE error is reported accordingly and changes to Object Metadata table will not be committed.

If it is evaluated as not attempting a breaking schema change in SQL Server then metadata from C/SIDE working memory is saved and committed to Object Metadata table.

PLEASE NOTE: At this stage NO CHANGES ARE MADE TO THE SQL SERVER DATA STRUCTURE.

3. When prompting for SYNCHRONIZATION, Microsoft Dynamics NAV Server then compares Object Metadata table with Object Metadata Snapshot table content. Any difference in the value for the “Hash” field is a flag to Microsoft Dynamics NAV Server that a change exists and should be subsequently applied physically SQL Server side as structural changes.

So with NAV 2013 R2, when we import objects or compile objects the changes are still in temporary database, no changes are done on SQL Server Till now. For having those changes we require Synchronization.

Prompting for Synchronization happens when

1. Performing ANY Microsoft Dynamics NAV client action.

OR

2. Running the Sync-NAVTenant Windows PowerShell cmdlet.

In Next Post we will see what other scenarios are there with NAV 2013 R2 and discuss how to run Sync Tenant.

Regards,
Saurav Dhyani

Comments

Popular posts from this blog

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 - 

MSDYN365BC - Data Upgrade To Microsoft Dynamics 365 Business Central on premises.

Hi Readers, We have already talked about the number of steps for upgrading to Business Central on Premises from different NAV versions. After that article, I received multiple requests for an article which list down steps for Data Migration. In this article, we will discuss steps of data migration to MSDYN365BC (on-Prem) from NAV 2017. For this article, I am considering a Cronus Demo Database without any customization. For an actual upgrade project, we will have to complete object merge using compare and Merge process. After the Merge Process, the next step is data migration. Let's discuss those steps. Direct Upgrade to Microsoft Dynamics 365 Business Central (on-Prem) is from following versions - 1. NAV 2015. 2. NAV 2016. 3. NAV 2017. 4. NAV 2018.