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.
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:
- Revert the change(s) manually in the Development Environment
- Import the old object(s) from FOB
- Create/import an upgrade codeunit with synch. instructions and call the synch. again
- Development Environment - Tools – Synch. All Table Schema Changes – Force (this action can delete data in the affected columns)
- Administration Shell – Sync-NAVTenant –Mode ForceSync (this action can delete data in the affected columns)
- 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
Post a Comment