Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / Database sync failed
Finance forum
Suggested answer

Database sync failed

Posted on by 6,125

Hi Experts

I am getting the below error while performing the database sync. I already performed full build multiple times.

Application version 10.0.21

AOS database sync failed. Microsoft.Dynamics.AX.Framework.Database.TableSyncException: Full sync did not complete successfully. Error: ArgumentNullException:Value cannot be null.
Parameter name: metadata
at Microsoft.Dynamics.Ax.Xpp.Utilities.ParameterHelper.Ensure(String parameterName, Object parameterValue)
at Microsoft.Dynamics.AX.Data.Management.View.ViewQueryNode..ctor(Int32 dataset, AxQuerySimple metadata)
at Microsoft.Dynamics.AX.Data.Management.View.ManagedSyncViewWorker.GetViewQueryNode(Int32 viewId, Boolean isDataEntityView)
at Microsoft.Dynamics.AX.Data.Management.View.ManagedSyncViewWorker.PopulateViewList(Int32 viewId)
at Microsoft.Dynamics.AX.Data.Management.View.ManagedSyncViewWorker.SortSyncRequest(IEnumerable`1 requests)
at Microsoft.Dynamics.AX.Data.Management.View.ManagedSyncViewWorker.SyncAll(IProducerConsumerCollection`1 modifiedViewDependencies)
at Microsoft.Dynamics.AX.Data.Management.ManagedSyncWorkerManager.SyncAll()
at Microsoft.Dynamics.AX.Data.Management.ManagedSync.<SyncAll>b__21_0()
at Microsoft.Dynamics.AX.Data.Management.ManagedSync.EnsureMetadataProviderCacheCleared(Action action)
at Microsoft.Dynamics.AX.Data.Management.ManagedSync.SyncAll()
at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.RunFullManagedSync(SyncOptions options, String sqlConnectionString, IMetadataProvider metadataProvider)
at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.<>c__DisplayClass20_0.<RunFullTableSync>b__0()
at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.ExecuteWithinAOS(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider, Func`1 func, Action`1 errorHandler).
at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.<>c.<RunFullTableSync>b__20_1(Tuple`2 result)
at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.ExecuteWithinAOS(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider, Func`1 func, Action`1 errorHandler)
at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.RunFullTableSync(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider)
at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.FullTableViewSync()
at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.FullSync()
at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.RunSync()
at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.Run(String metadataDirectory, String sqlConnectionString, SyncOptions options)
Database synchronization completed (160920 ms). Errors found.
AOS database sync failed. Microsoft.Dynamics.AX.Framework.Database.TableSyncException: Full sync did not complete successfully. Error: ArgumentNullException:Value cannot be null.
Parameter name: metadata
at Microsoft.Dynamics.Ax.Xpp.Utilities.ParameterHelper.Ensure(String parameterName, Object parameterValue)
at Microsoft.Dynamics.AX.Data.Management.View.ViewQueryNode..ctor(Int32 dataset, AxQuerySimple metadata)
at Microsoft.Dynamics.AX.Data.Management.View.ManagedSyncViewWorker.GetViewQueryNode(Int32 viewId, Boolean isDataEntityView)
at Microsoft.Dynamics.AX.Data.Management.View.ManagedSyncViewWorker.PopulateViewList(Int32 viewId)
at Microsoft.Dynamics.AX.Data.Management.View.ManagedSyncViewWorker.SortSyncRequest(IEnumerable`1 requests)
at Microsoft.Dynamics.AX.Data.Management.View.ManagedSyncViewWorker.SyncAll(IProducerConsumerCollection`1 modifiedViewDependencies)
at Microsoft.Dynamics.AX.Data.Management.ManagedSyncWorkerManager.SyncAll()
at Microsoft.Dynamics.AX.Data.Management.ManagedSync.<SyncAll>b__21_0()
at Microsoft.Dynamics.AX.Data.Management.ManagedSync.EnsureMetadataProviderCacheCleared(Action action)
at Microsoft.Dynamics.AX.Data.Management.ManagedSync.SyncAll()
at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.RunFullManagedSync(SyncOptions options, String sqlConnectionString, IMetadataProvider metadataProvider)
at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.<>c__DisplayClass20_0.<RunFullTableSync>b__0()
at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.ExecuteWithinAOS(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider, Func`1 func, Action`1 errorHandler).
at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.<>c.<RunFullTableSync>b__20_1(Tuple`2 result)
at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.ExecuteWithinAOS(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider, Func`1 func, Action`1 errorHandler)
at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.RunFullTableSync(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider)
at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.FullTableViewSync()
at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.FullSync()
at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.RunSync()
at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.Run(String metadataDirectory, String sqlConnectionString, SyncOptions options)
syncengine.exe exited with code -1.

  • Sheikh Sohail Profile Picture
    Sheikh Sohail 6,125 on at
    RE: Database sync failed

    Hey, Andre

    It was related to PU-45, So Microsoft suggested to re-allocate the VM.

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 287,914 Super User on at
    RE: Database sync failed

    It is hard to say if it is related to your customization or if it is another rare occurring bug. Do you have customizations on views or data entities?

  • Suggested answer
    Sheikh Sohail Profile Picture
    Sheikh Sohail 6,125 on at
    RE: Database sync failed

    Hi Judy

    Thank you for your reply.

    Yes, I am the administrator of the environment.

    "ManagedSyncViewWorker" this object does not exist anywhere.

  • huijij Profile Picture
    huijij 19,803 on at
    RE: Database sync failed

    Hi Sohail,

    Have you try to fix it with admin role?

    Please try to do a full build of the 'ManagedSyncViewWorker'  as suggested in the error message.

  • Sheikh Sohail Profile Picture
    Sheikh Sohail 6,125 on at
    RE: Database sync failed

    Hi Andre

    Yes, We have some customization, not ISV, but these are the minimum customization like field addition in extension tables or custom tables.

    More importantly, I already tried to redeploy the package after removing my customization.

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 287,914 Super User on at
    RE: Database sync failed

    Hi Sohail,

    Is this a standard environment or do you have customizations? Did the full build complete without errors? When was it working the last time without this issue and what got changed? Did you apply the 10.0.21 update or was there a change in the application (customization, ISV)?

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,914 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,549 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans