Sunteți pe pagina 1din 19

Design Insights

Dmitry Chadayev
Sr. Program Manager
Microsoft Dynamics NAV

August 2014

we have introduced a number of improvements to the schema synchronization process that make it
more explicit, more granular and controllable, providing you with the flexibility of deciding when and
how your table changes should be synchronized with corresponding SQL tables.

Schema
Synchronization

NAV Table
(Metadata or
Table
Definition)

NAV
Server

SQL Table
(Schema)

automatically

on demand

System tables are synchronized by the Development Environment,


not by Microsoft Dynamics NAV Server

Validate table metadata


changes
No

Yes

Can the changes be applied


without deleting data?

Save table metadata


changes
Error

Synchronize schema for


this table

Save table metadata


changes

Save metadata changes

Force-Synchronize
schema for this table

Validate table metadata


changes

NAV
Server

Synchronize
Schema

Fill-in

Table ID

Upgrade Table ID

Mode

170001

Copy

23

170002

Copy

25

170003

Copy

167

170004

Move

445

Force
Fill-in

Data

Discover
Changes

App*
Modify

Dev.
Environment

By comparing the content


of the Object Metadata
and Object Metadata
Snapshot system tables

Virtual Table
2000000135
Table Synch. Setup,
containing IDs of all
tables with schema
changes

No
Error

Yes

Can the changes


be applied
without
deleting data?

Apply changes to the


SQL table

Success

Delete data in the


changed/removed
columns

Copy the data from the


changed/removed
columns into the
upgrade table

Rename the original


table into the upgrade
table (preserving all
data)

Apply changes to the


SQL table

Apply changes to the


SQL table

Create the new table


and leave it empty

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 to avoid timeouts.

State is returned by the


Get-NAVTenant cmdlet

TenantState:
Operational
Change a table in
C/SIDE

NAV Server detects that the


definition of the table has
changed in the Development
Environment

Save and choose to synch.


"Later"

NAV Server allows all connections until the


connection requires a table which is out of sync.

TenantState:
OperationalWithSyncPending

Either by using the Tools menu


in the Development
Environment or SyncNAVTenant cmdlet
Observe the progress
in the Development
Environment and
Admin. Shell

Synchronize schema
TenantState:
OperationalWithSyncInProgress

No

Yes
Sync Error

TenantState:
Operational

TenantState:
OperationalWithSyncFailure

TenantState:
OperationalWithSyncFailure

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 monotor its progress and
monitor the state of your database (tenant).

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.

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.

On this page you will have access to resources for developers, consultants, sales and business decision
makers. For more detailed information please visit our readiness library, which includes a variety of
materials such as how-to videos, demo scripts, white papers and slide decks.

http://go.microsoft.com/fwlink/?LinkID=510890

S-ar putea să vă placă și