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

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.