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

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    ---------------------------

NAV 2013 R2 - Cumulative update 12 Released.

Hi all, Please find below the details of  Cumulative Update 12 released for Microsoft Dynamics NAV 2013 R2. Title - Cumulative Update 12 for Microsoft Dynamics NAV 2013 R2 Build No. - 38053 Release Date - October, 2014 Local Version Included - AU, AT, BE, CH, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, SE, UK, RU Download Link Note: Implementing this cumulative update will require a database conversion unless you have already implemented update rollup 5.

NAV 2013 Upgrade Part III - Data Upgrading.

Hi all, As per agenda we need to discuss the data upgrade in NAV 2013. The process is similar to what used to be till NAV 2009 R2 but with some changes. Let's start the process. Remember -  1) You can only upgrade a database to NAV 2013 from NAV 2009 SP1 / R2 SQL Only. 2) The Synchronization of users with SQL Server is no more required.