Skip to main content

NAV 2015 - Changes in Schema Synchronization - Part III.

Hi all,

As discussed in Previous post we will see more about Modes in Upgrade Codeunits, Powershell Commands & benefits of New Schema Synchronization in NAV 2015.

If you haven't read the earlier post, refer the links below -

NAV 2015 - Changes in Schema Synchronization - Part I.

NAV 2015 - Changes in Schema Synchronization - Part II.


What does Check, Move, Copy and Force Options are in Upgrade Codeunits?

Below is the Summary of All the Options that we will use in Upgrade Codeunits.





Let's See Everyone in Detail. Below are the examples provided by Microsoft for each case -

1. CHECK

If we will use Check and the change can be applied without deleting data the Changes will update the SQL Table.


2. MOVE -
Rename the original table into upgrade table (with Data). Create a new table without data and new fields.

3. COPY -
Copy the data from the changed / removed columns into the upgrade table. Apply changes to SQL Table.


4. FORCE -
Delete data in the changed / Removed Columns. Apply Changes to SQL Table.

Syn-NavTenant (our Best freind in NAV 2013 R2) Will also work with Three Modes.
  • Mode:CheckOnly
  • Mode:ForceSync
  • Mode:Sync
Importing/Deleting & Compiling of Objects is also possible via Powershell.
  •  Import-NAVApplicationObjects
  •  Delete-NAVApplicationObjects
  •  Compile-NAVApplicationObjects
 With -SynchronizeSchemaChanges Yes/No/Force 

** For large tables, schema sync can take a long time. 
Make sure you increase the value in the SQL Command Timeout node (default is 10 min.) of the CustomSettings.config file / Administration Shell to avoid timeouts.

How Schema sync will work with MultiTenant Environment?


What if TenantState - Operational with Sync Failure?

When schema synchronization detects an unhandled destructive change in the definition of a table, it reports an error

To recover from this error, the following approaches can be used:
  1. Revert the change(s) manually in the  Development Environment
  2. Import the old object(s) from FOB
  3. Create/import an upgrade codeunit with synch. instructions and call the synch. again
  4. Development Environment - Tools – Synch. All Table Schema Changes – Force (this action can delete data in the affected columns)
  5. Administration Shell – Sync-NAVTenant –Mode ForceSync (this action can delete data in the affected columns)
  6.  Restore full backup
What are the Benefits of New Schema Sync in NAV 2015?

> Performed on demand - transparency

As a developer and system administrator, you control when to call the schema synchronization and how to synchronize table changes (in the Developement Environment and Administration Shell). You can invoke it, plan for it and schedule it on a case by case basis. You can also monitor its progress and monitor the state of your database (tenant).

> Not blocking other changes - productivity

Schema Synchronization has become more granular. It can be performed per table object as well as for all table changes at once. When one table is being synchronized, you are not longer blocked, and you can continue making changes to other tables.

> Opened for additional instructions - flexibility 

Using upgrade codeunits, you can provide input for the schema synchronization to do extra tasks, like automatically moving or copying data into upgrade tables, checking the changes or forcefully applying them where necessary. 

--------------------------------------------------------------------------------------------------

Hope you are able to understand the changes we find in NAV 2015 related to Schema Synchronization.

We will cover some of the above discussed points in details in future post.

Stay tuned for more about #NAV 2015.

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.