web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Update DevBox to 10.0.38 fails

(1) ShareShare
ReportReport
Posted on by 766
Hello together,
 
I'm trying to update a cloud hosted environment which is currently running on 10.0.34 to preview version of 10.0.38 (Product build: 10.0.1777.28). It fails at step 25 db sync with an error message that is not very helpful:

The step 25 failed with the following error: Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt
 
Looking into the event viewer I found another error from AOSFlightingErros which says: 

Environment type not supported due to missing mandatory certificate
 
Has anyone an idea what to do, or where to dig deeper?
 
The cloud hosted environment was deployed yesterday through eu.lcs. It has some custom code and a copy of the productive database. It was just deployed to test the update process before we excecute it in the sandbox environment.
 
 
 
 
I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    300,911 Super User 2025 Season 2 on at
    Hi Thomas, 
     
    If you download the log files, are you able to find a dbsync log file? That might give more clarity why the DBSync failed.
  • Suggested answer
    Komi Siabi Profile Picture
    13,093 Most Valuable Professional on at
    Hi,

    Do a full build and Sync of the .34 before applying the new update.
  • ThomasWilke Profile Picture
    766 on at
    @Komi Siabi
    I did a full build and a db sync before. 
     
    @Andre Arnaud de Calavon
    There is an error log file called Step25dbsync.error but it is not helping at all.
    This is the content:
     
    Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
       at configurationKeyAssociate(Char* )
       at Microsoft.Dynamics.Ax.MSIL.Interop.configurationkey2id(String configurationKey)
       at Microsoft.Dynamics.AX.Data.Management.Metadata.MetadataSupportInterOp.ConfigurationKey2Id(String configKeyName)
       at Microsoft.Dynamics.AX.Data.Management.Metadata.MetadataSupportInterOp.IsConfigurationKeyEnabled(String configKeyName)
       at Microsoft.Dynamics.AX.Data.Management.ManagedMetadataSupport.LoadConfigKeyFromMetadataAndDatabase()
       at Microsoft.Dynamics.AX.Data.Management.ManagedMetadataSupport.IsDisabledSysDeletedObjectConfigurationKey(String configKeyName)
       at Microsoft.Dynamics.AX.Data.Management.ManagedMetadataSupport.IsConfigKeyDisabled(String configKeyName)
       at Microsoft.Dynamics.Ax.Xpp.Metadata.SqlRowVersionMetadataProvider.IsSysRowVersionConfigurationKeyEnabled(IManagedMetadataSupport metadataSupport) in D:\dbs\sh\l23t\1107_210357\cmd\6\Source\Kernel\xppil\XppSupport\Metadata\SysRowVersion\SqlRowVersionMetadataProvider.cs:line 59
       at Microsoft.Dynamics.AX.Data.Management.SysRowVersion.SqlRowVersionMetadataProvider.CheckIsSysRowVersionConfigurationKeyEnabled()
       at Microsoft.Dynamics.AX.Data.Management.SysRowVersion.SqlRowVersionMetadataProvider.<>c__DisplayClass31_0.<.ctor>b__6()
       at System.Lazy`1.CreateValue()
       at System.Lazy`1.LazyInitValue()
       at Microsoft.Dynamics.AX.Data.Management.SysRowVersion.SqlRowVersionMetadataProvider.IsSysRowVersionConfigurationKeyEnabled()
       at Microsoft.Dynamics.AX.Data.Management.SysRowVersion.SqlRowVersionMetadataProvider.AddSqlRowVersionFieldRenameSql(StringBuilder preStmt, HashSet`1 alreadyExistingSqlFields, Int32 tableId, String sqlTableName)
       at Microsoft.Dynamics.AX.Data.Management.Delta.DeltaAddField.StrGenerator(DeltaStep step, IManagedSyncDDLBuilder ddlBuilder, HashSet`1 alreadyExistingFields)
       at Microsoft.Dynamics.AX.Data.Management.Delta.TableLevelDeltas.GenerateDelta(FieldDeltas fieldDeltas, IndexDeltas indexDeltas, IReadOnlyList`1 triggerDeltas, IReadOnlyList`1 sequenceDeltas, IManagedSyncDDLBuilder DdlBuilder, Boolean onlineMode, HashSet`1 ignoreIndexList, HashSet`1 alreadyExistingFields, Boolean hasFullTextIndex, Boolean& bNeedToDropFullIndexTemporarily, Boolean runPreCheck, LargeTableData largeTableData, SyncOptions syncOptions)
       at Microsoft.Dynamics.AX.Data.Management.IncrementalSyncTableSchemaBuilder.GenerateSqlDDL(HashSet`1 ignoreIndexList, Lazy`1 compatibilityLevel, HashSet`1 alreadyExistingFields, LargeTableData largeTableData, Boolean ignoreFulltextIndexes)
       at Microsoft.Dynamics.AX.Data.Management.ManagedSyncTableWorker.TryExecuteModifyTableViaAlterTable(AxTable newTableSchema, HashSet`1 ignoreIndexListCache, IncrementalSyncTableSchemaBuilder tableSchemaBuilder, Boolean isSharingOverrideTable)
       at Microsoft.Dynamics.AX.Data.Management.ManagedSyncTableWorker.ExecuteModifyTable(AxTable newTableSchema, AxTable oldTableSchema, Int32 tableId, Boolean isSharingOverrideTable, HashSet`1 optionalIndexes)
       at Microsoft.Dynamics.AX.Data.Management.ManagedSyncTableWorker.ModifyTable(AxTable newTableSchema, Dictionary`2 oldTableSchemaDictionary, IProducerConsumerCollection`1 modifiedViewDependencies, HashSet`1 optionalIndexes)
       at Microsoft.Dynamics.AX.Data.Management.ManagedSyncTableWorker.SyncIncremental(IList`1 requests, IList`1 dropEntities)
       at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.BootstrapKernelSync(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider, Boolean testCreateFromScratch, Boolean checkAllKernelTables)
       at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.StartAosCode(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider)
       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.RunDisableConfigKeys(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider, String[] configKeysToDisable)
       at Microsoft.Dynamics.AX.Framework.Database.Tools.ConfigurationKeyIdSync.PostSync(List`1 newConfigKeyNames)
       at Microsoft.Dynamics.AX.Framework.Database.Tools.ObjectIdSync.CommitChanges(SqlDataAccessManager dataAccessService, List`1 newValues)
       at Microsoft.Dynamics.AX.Framework.Database.Tools.ObjectIdSync.runFullSync()
       at Microsoft.Dynamics.AX.Framework.Database.Tools.IdSync.RunFullSync(SyncOptions options)
       at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.FullIdSync()
       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)
       at Microsoft.Dynamics.AX.Deployment.Setup.Program.RunFullSync(SetupConfiguration config, String targetDbConnectionStringSqlAuth, Boolean servicingSync, Boolean isMainServiceSync)
       at Microsoft.Dynamics.AX.Deployment.Setup.Program.RunServicingSync(String targetDbConnectionStringSqlAuth, SetupConfiguration config, Boolean isMainServiceSync)
       at Microsoft.Dynamics.AX.Deployment.Setup.Program.Run(SetupConfiguration config)
       at Microsoft.Dynamics.AX.Deployment.Setup.Program.Main(String[] args)
     
  • André Arnaud de Calavon Profile Picture
    300,911 Super User 2025 Season 2 on at
    Hi Thomas,
     
    Don't you have another Step25dbsync_{{timestamp}}.log file? That file, once fully completed can have over 100K lines with sync details. 
  • ThomasWilke Profile Picture
    766 on at
    Yes there is the log file for Step25 - but there is no hint it seems to be interrupted. These are the last lines
     
    ...
    12/12/2023 12:47:17: Committing new Ids to the table CONFIGKEYIDTABLE
    12/12/2023 12:47:17: Post configuration keys sync. Parsing config key: Name=SysDeletedObjectSysDataState, Enabled=Yes, EnabledByDefault=No.
    12/12/2023 12:47:17: Post configuration keys sync. Disabling config keys: SysDeletedObjectSysDataState
    12/12/2023 12:47:18: 2023-12-12T12:47:18.6370276+00:00 Beginning sync step: kernel bootstrap sync.
    12/12/2023 12:47:18: Syncing Table: SQLDICTIONARY
    12/12/2023 12:47:21: Schema has not changed between new table 'SqlDictionary' and old table 'SqlDictionary' with table id '65518'. Returning from ManagedSyncTableWorker.ExecuteModifyTable()
    12/12/2023 12:47:21: Syncing Table Finished: SQLDICTIONARY. Time elapsed: 0:00:00:02.9440122
    12/12/2023 12:47:21: Syncing Table: USERINFO
    12/12/2023 12:47:21: Schema has not changed between new table 'UserInfo' and old table 'UserInfo' with table id '65531'. Returning from ManagedSyncTableWorker.ExecuteModifyTable()
    12/12/2023 12:47:21: Syncing Table Finished: USERINFO. Time elapsed: 0:00:00:00.1135727
    12/12/2023 12:47:21: Syncing Table: SYSCONFIG
     
     
    I will try to identify any hint from event log. Maybe I can find more details.
  • André Arnaud de Calavon Profile Picture
    300,911 Super User 2025 Season 2 on at
    Hi Thomas,
     
    Usually, I search for the keyword error in the log files to check if there is something listed.
  • Community member Profile Picture
    9 on at
    Hi Thomas,
     
    Any resolution on this topic yet?
    I'm having same issue upgrading from 10.0.37.
  • Verified answer
    ThomasWilke Profile Picture
    766 on at
    Hi Igor,
     
    I was able to fix the issue with some support from Microsoft. In my case it was an issue with the SysRowVersionNumber table.
     
    I used the following script to fix it:
     

    DECLARE @KernelTables TABLE (
            TableName NVARCHAR(200),
            TableNumber Int);

    DECLARE @ResultKernelTables TABLE (
            TableNumber Int);

    -- List of all Kernel Tables, with a unique TableNumber
    INSERT INTO @KernelTables(TableName, TableNumber) VALUES('SQLDICTIONARY',1)
    INSERT INTO @KernelTables(TableName, TableNumber) VALUES('SYSCONFIG',2)
    INSERT INTO @KernelTables(TableName, TableNumber) VALUES('USERINFO',3)
    INSERT INTO @KernelTables(TableName, TableNumber) VALUES('SECURITYROLE',4)
    INSERT INTO @KernelTables(TableName, TableNumber) VALUES('DATABASELOG',5)
    INSERT INTO @KernelTables(TableName, TableNumber) VALUES('AOSDUPLICATEKEYEXCEPTIONMESSAGE',6)
    INSERT INTO @KernelTables(TableName, TableNumber) VALUES('TIMEZONESLIST',7)
    INSERT INTO @KernelTables(TableName, TableNumber) VALUES('TIMEZONESRULESDATA',8)

    -- get the KernelTable names
    DECLARE KernelTableName_cursor CURSOR LOCAL FOR
    SELECT TableName, TableNumber
    FROM @KernelTables

    -- (-1) : Exception happened
    -- 0  : Dropped no column
    -- 1  : Dropped atleast one Kernel Table column

    DECLARE @Result INT = 0;

    DECLARE @KernelTableName NVARCHAR(200);
    DECLARE @KernelTableNumber INT;

    DECLARE @SqlCmd NVARCHAR(500);

    BEGIN TRY
        BEGIN TRANSACTION T1

           OPEN KernelTableName_cursor;

           FETCH NEXT FROM KernelTableName_cursor INTO @KernelTableName, @KernelTableNumber;

           WHILE @@FETCH_STATUS = 0
                BEGIN

                    IF COL_LENGTH(@KernelTableName, 'SYSROWVERSIONNUMBER') IS NOT NULL
                        BEGIN
                SET @SqlCmd = 'ALTER TABLE dbo.' + @KernelTableName + ' DROP COLUMN SYSROWVERSIONNUMBER';
                            EXEC sp_executesql @SqlCmd;
                            SET @Result = 1;
                            INSERT INTO @ResultKernelTables(TableNumber) VALUES(@KernelTableNumber);
                        END

                    FETCH NEXT FROM KernelTableName_cursor INTO @KernelTableName, @KernelTableNumber;

                END


        COMMIT TRANSACTION T1

        SELECT @Result AS Result, TableNumber AS KernelTableNumber, 0 AS Error, '' AS ErrorMessage
        FROM @ResultKernelTables;

    END TRY

    BEGIN CATCH
        SELECT -1 AS Result, -1 AS KernelTableNumber, ERROR_NUMBER() as Error, ERROR_MESSAGE() as ErrorMessage
        ROLLBACK TRANSACTION T1
    END CATCH

  • Community member Profile Picture
    9 on at
    Hi Thomas,
     
    Running script worked for me.
    Rerun step 25 and DB sync passed.
    Thank you! saved the day.
     
    BR, Igor

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 660 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 549 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 307 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans