Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Synchronize Failed After Full Build

Posted on by Microsoft Employee

Hi, 

I have problem after i do full build all model in AX7.

the synchronize database is failed.

And this my error list.

Severity Code Description Project File Line Suppression State
Error The statement has been terminated. 0
Error --- End of inner exception stack trace --- 0
Error --- End of stack trace from previous location where exception was thrown --- 0
Error ---> System.Data.SqlClient.SqlException: The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.SALESTABLE' and the index name 'I_2022SALESANALYSISIDX'. The duplicate key value is (5637144576, brmf, , 0, BRL, Jan 1 1900 12:00AM). 0
Error ---> System.Data.SqlClient.SqlException: The index 'I_10058DOCUMENTROUTINGTABLEPRINTERNAMEIDX' is dependent on column 'PRINTERNAME'. 0
Error ALTER TABLE ALTER COLUMN PRINTERNAME failed because one or more objects access this column. 0
Error ALTER TABLE WHSDOCUMENTROUTINGLINE ALTER COLUMN PRINTERNAME NVARCHAR(70) NOT NULL ; 0
Error AOS database sync failed. Microsoft.Dynamics.AX.Framework.Database.TableSyncException: Full sync did not complete successfully. Error: AggregateSyncException:Exception of type 'Microsoft.Dynamics.AX.Data.Management.AggregateSyncException' was thrown. 0
Error at Microsoft.Dynamics.AX.Data.Management.DBExecute.ExecuteDDLWithNewTransaction(IEnumerable`1 commandTextInBatch) 0
Error at Microsoft.Dynamics.AX.Data.Management.DBExecute.ExecuteDDLWithNewTransaction(String commandText) 0
Error at Microsoft.Dynamics.AX.Data.Management.DBExecute.ExecuteSqlBatch(TableSyncSqlBatch sqlBatch) 0
Error at Microsoft.Dynamics.AX.Data.Management.DBExecute.ThrowOnSqlExecuteException(SqlException e, String commandText) 0
Error at Microsoft.Dynamics.AX.Data.Management.ManagedSync.<SyncAll>b__18_0() 0
Error at Microsoft.Dynamics.AX.Data.Management.ManagedSync.EnsureMetadataProviderCacheCleared(Action action) 0
Error at Microsoft.Dynamics.AX.Data.Management.ManagedSyncTableWorker.ExecuteModifyTable(AxTable newTableSchema, AxTable oldTableSchema, Int32 tableId) 0
Error at Microsoft.Dynamics.AX.Data.Management.ManagedSyncTableWorker.ModifyTable(AxTable newTableSchema, Dictionary`2 oldTableSchemaDictionary) 0
Error at Microsoft.Dynamics.AX.Data.Management.ManagedSyncTableWorker.SyncAll() 0
Error at Microsoft.Dynamics.AX.Data.Management.ManagedSyncTableWorker.TablesSync(IEnumerable`1 TablesToSync, Dictionary`2 oldTableSchemaDictionary) 0
Error at Microsoft.Dynamics.AX.Data.Sql.SqlDataAccessManager.<ExecuteNonQuery>b__27_0(SqlCommand c) 0
Error at Microsoft.Dynamics.AX.Data.Sql.SqlDataAccessManager.ExecuteSql[T](SqlCommand cmd, Func`2 sqlFunc) 0
Error at Microsoft.Dynamics.AX.Data.Sql.SqlDataAccessManager.HandleException(ExceptionDispatchInfo edi, SqlExecutionInfo execInfo) 0
Error at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.<>c.<RunFullTableSync>b__15_1(Tuple`2 result) 0
Error at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.<>c__DisplayClass15_0.<RunFullTableSync>b__0() 0
Error at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.ExecuteWithinAOS(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider, Func`1 func, Action`1 errorHandler) 0
Error at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.ExecuteWithinAOS(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider, Func`1 func, Action`1 errorHandler). 0
Error at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.RunFullManagedSync(SyncOptions options, String sqlConnectionString, IMetadataProvider metadataProvider) 0
Error at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.RunFullTableSync(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider) 0
Error at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.FullSync() 0
Error at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.FullTableViewSync() 0
Error at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.Run(String metadataDirectory, String sqlConnectionString, SyncOptions options) 0
Error at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.RunSync(SyncOptions options) 0
Error at Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func) 0
Error at Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.SqlCommandExtensions.<>c__DisplayClass1.<ExecuteNonQueryWithRetry>b__0() 0
Error at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() 0
Error at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) 0
Error at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite) 0
Error at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) 0
Error at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) 0
Error at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) 0
Error at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 0
Error CREATE UNIQUE INDEX I_2022SALESANALYSISIDX ON DBO.SALESTABLE(PARTITION,DATAAREAID,SALESUNITID,WORKERSALESRESPONSIBLE,CURRENCYCODE,SOLTIUS_SALESDATE) WITH ( DATA_COMPRESSION = PAGE ); 0
Error CREATE UNIQUE INDEX I_2022SALESUNITIDX ON DBO.SALESTABLE(PARTITION,DATAAREAID,SALESID,SALESUNITID) WITH ( DATA_COMPRESSION = PAGE ); 0
Error syncengine.exe exited with code -1. 1
Error Table Sync Failed for Table: SalesTable Error: System.InvalidOperationException: Database execution failed: The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.SALESTABLE' and the index name 'I_2022SALESANALYSISIDX'. The duplicate key value is (5637144576, brmf, , 0, BRL, Jan 1 1900 12:00AM). 0
Error Table Sync Failed for Table: WHSDocumentRoutingLine Error: System.InvalidOperationException: Database execution failed: The index 'I_10058DOCUMENTROUTINGTABLEPRINTERNAMEIDX' is dependent on column 'PRINTERNAME'. 0
Error UPDATE SQLDICTIONARY SET STRSIZE = 70, RIGHTJUSTIFY = 0, FIELDTYPE = 0 WHERE NAME = 'PrinterName' AND TABLEID = 10058; 0

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Synchronize Failed After Full Build

    Hi Ievgen thanks for your answer,

    i will fixed it

  • Verified answer
    Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: Synchronize Failed After Full Build

    Hi Shifa Amelia,

    Error is quite descriptive, just read it. "The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.SALESTABLE' and the index name 'I_2022SALESANALYSISIDX'. The duplicate key value is (5637144576, brmf, , 0, BRL, Jan 1 1900 12:00AM). 0"

    So it says that you created new unique index but your data is violation this index. To fix this issue you need to fix data, so there won't be any duplicates for this index. Find incorrect records and update or delete them. Maybe that's an index issue and it should not be unique.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,188 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,030 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans