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, ...
Unanswered

KB 4556921 failed at Step 25 for D365 PU34 (Ax2012 to D365 Data upgrade failure Binary update hotfix)

(0) ShareShare
ReportReport
Posted on by 758

Hi Everyone,

I am doing data upgrade from Ax2012 to D365. While applying data upgrade package, I got failure at step 5.

I did some workaround and found that I need to apply KB 4556921 to overcome the failure of step 5.

Hence I am applying the KB 4556921 to my DEV environment, but I am facing error at step 25. Please find screenshot below. Also I downloaded the log, but couldn't figure out the root cause.  I have pasted the log file below,

Please suggest some solution on this.

08/05/2020 20:14:38: *************************
08/05/2020 20:14:38: Log file initialized.
08/05/2020 20:14:38: *************************
08/05/2020 20:14:38: Bindir: K:\AosService\PackagesLocalDirectory
MetadataDir: K:\AosService\PackagesLocalDirectory
Sql scripts: 

08/05/2020 20:14:39: Setup mode is "servicesync".
08/05/2020 20:14:58: Syncing modules: 
08/05/2020 20:15:02: [DbSync: 7.0.30263.0] [Platform: 7.0.5644.41461]: Beginning Sync...
08/05/2020 20:15:04: [DbSync: 7.0.30263.0] [Platform: 7.0.5644.41461]: DroppedTableValidator: Required tables are missing for Drop Table Validator to process fully. This may be due to upgrading from AX2012 where TABLEIDTABLE did not exist.
08/05/2020 20:15:04: [DbSync: 7.0.30263.0] [Platform: 7.0.5644.41461]: AdminUserValidator: There are no disabled Admin user accounts in UserInfo table.
08/05/2020 20:15:05: [DbSync: 7.0.30263.0] [Platform: 7.0.5644.41461]: WideIndexesValidator: There are no indexes with 46 or more columns.
08/05/2020 20:15:05: [DbSync: 7.0.30263.0] [Platform: 7.0.5644.41461]: DefaultTextCatalogConfigurator: Getting fulltext catalog count using command: 'SELECT count(*) FROM sys.fulltext_catalogs;'
08/05/2020 20:15:05: [DbSync: 7.0.30263.0] [Platform: 7.0.5644.41461]: DefaultTextCatalogConfigurator: Fulltext catalog count is: 1. Configuring default fulltext catalog will be skipped
08/05/2020 20:15:05: [DbSync: 7.0.30263.0] [Platform: 7.0.5644.41461]: CompatibilityLevelConfigurator: Getting Compatibilty Level for Database 'AxDB'. Command: SELECT compatibility_level from sys.databases where name=@databaseName;
08/05/2020 20:15:05: [DbSync: 7.0.30263.0] [Platform: 7.0.5644.41461]: CompatibilityLevelConfigurator: Compatibilty Level for Database 'AxDB' is: 130
08/05/2020 20:15:05: [DbSync: 7.0.30263.0] [Platform: 7.0.5644.41461]: CompatibilityLevelConfigurator: Compatibility level '130' meets minimum required level '130'. Skipping compitability level configuration for Database 'AxDB'
08/05/2020 20:15:05: [DbSync: 7.0.30263.0] [Platform: 7.0.5644.41461]: SystemTableIndexConfigurator: Adding Nonclustered index to SQLDICTIONARY table with command: 'IF EXISTS ( SELECT * from sys.tables where name = 'SQLDICTIONARY')
BEGIN
	IF NOT EXISTS(SELECT * FROM sys.indexes WHERE name = 'SQLDICTIONARY_FieldId_Name' AND object_id = OBJECT_ID('SQLDICTIONARY'))
	BEGIN
		declare @sqlStatement nvarchar(512)
        set @sqlStatement = 'CREATE NONCLUSTERED INDEX [SQLDICTIONARY_FieldId_Name]
		        ON [dbo].[SQLDICTIONARY] ([FIELDID], [NAME]) 
		        INCLUDE (TABLEID, ARRAY, SQLNAME, FIELDTYPE, STRSIZE, SHADOW, RIGHTJUSTIFY, NULLABLE, FLAGS, RECVERSION)'
        IF SERVERPROPERTY('EngineEdition') = 5 or SERVERPROPERTY('EngineEdition') = 3 --SQL Azure or Enterprise
        BEGIN
	        set @sqlStatement = @sqlStatement   ' WITH (ONLINE = ON)'
        END

        exec(@sqlStatement);
	END
END'.
08/05/2020 20:15:05: [DbSync: 7.0.30263.0] [Platform: 7.0.5644.41461]: SystemTableIndexConfigurator: Adding Nonclustered index to DATAAREA table with command: 'IF EXISTS ( SELECT * from sys.tables where name = 'DATAAREA')
BEGIN
	IF NOT EXISTS(SELECT * FROM sys.indexes WHERE name = 'DATAAREA_RecId' AND object_id = OBJECT_ID('DATAAREA'))
	BEGIN
        declare @sqlStatement nvarchar(512)
        set @sqlStatement = 'CREATE NONCLUSTERED INDEX [DATAAREA_RecId]
		        ON [dbo].[DATAAREA] ([RECID]) 
		        INCLUDE ([ID], [NAME], [ISVIRTUAL], [ALWAYSNATIVE], [TIMEZONE], [RECVERSION], [PARTITION])'
        IF SERVERPROPERTY('EngineEdition') = 5 or SERVERPROPERTY('EngineEdition') = 3 --SQL Azure or Enterprise
        BEGIN
	        set @sqlStatement = @sqlStatement   ' WITH (ONLINE = ON)'
        END

        exec(@sqlStatement);
	END
END'.
08/05/2020 20:15:05: [DbSync: 7.0.30263.0] [Platform: 7.0.5644.41461]: GlobalTempTableConfigurator: Getting GLOBAL_TEMPORARY_TABLE_AUTO_DROP flag using command: 'SELECT CAST(VALUE AS INT) FROM SYS.DATABASE_SCOPED_CONFIGURATIONS WHERE NAME = 'GLOBAL_TEMPORARY_TABLE_AUTO_DROP''
08/05/2020 20:15:05: [DbSync: 7.0.30263.0] [Platform: 7.0.5644.41461]: GlobalTempTableConfigurator: GLOBAL_TEMPORARY_TABLE_AUTO_DROP is not present in database. Skipping configuring this flag for Database 'AxDB'
08/05/2020 20:15:05: 2020-08-05T20:15:05.2367316 00:00 Beginning sync step: InitialSchema.
08/05/2020 20:15:18: 2020-08-05T20:15:18.1271894 00:00 InitialSchema finished. Time elapsed: 0:00:00:12.8764363.
08/05/2020 20:15:18: Initialize schema failed.	Microsoft.Dynamics.AX.Framework.Database.TableSyncException: Failed during InitialSchema at command:
                                \n-- Detect the version of the startup code which has previously run
------------------------------------------------
------------------------------------------------
-- REGION       SCRIPT VERSION
------------------------------------------------
------------------------------------------------

-- Run this script after every GO statement to ensure these variables are available to other scripts in other batches

DECLARE @ScriptVersion INT
DECLARE @SchemaVersion INT



-- 1, Initial script release
-- 2, Added SysAncestorsTable
-- 3, Fixed root table ID usage instead of the current table ID in SP_AssignTableFieldId.
-- 4, Update Sys Client Sessions insert stored procedure
-- 5, Updating algorithm for generating enum values
-- 6, Updating SP_getNumInternal with a new parameter
-- 7, Added tables and triggers for SQL Data Sync
-- 8, Adding unique indexes back to IDTables
-- 9, Update SysCompressTable sp to remove table or clustered index compression.
-- 10, Update AXClassifierFunction to include odata and values.
-- 11, Update CREATEUSERSESSIONS to remove the condition of "status = 1".
-- 12, Update CREATESERVERSESSIONS to remove the condition of "status = 0" and check for flighting "DisableAosHeartbeat".
-- 13, Updated CREATEUSERSESSIONS to address potential timing issue causing login times to have fractional second components.
-- 14, Updated Unique constraint for SysSingleRecordSharingConfig
-- 15, Update CREATESERVERSESSIONS to add a lock around insert of a new record, preventing one type of AOS startup crashes.
-- 16, Update getNumInternal to handle integer overflow on RecVersion
SET @ScriptVersion = 16






SELECT @SchemaVersion = A.SchemaVersion FROM __AOSSTARTUPVERSION A
IF (@@ROWCOUNT < 1)
    SET @SchemaVersion = 0


------------------------------------------------
------------------------------------------------
-- /REGION       SCRIPT VERSION
------------------------------------------------
------------------------------------------------


------------------------------------------------
------------------------------------------------
-- /REGION       LEGACY AXUTIL
------------------------------------------------
------------------------------------------------
--ScriptRegion\n\nException message: System.Data.SqlClient.SqlException (0x80131904): Invalid object name '__AOSSTARTUPVERSION'.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Microsoft.Dynamics.AX.Framework.Database.Synchronize.InitialSchemaSync.ScriptRegion.ExecuteCommand(SqlCommand cmd)
   at Microsoft.Dynamics.AX.Framework.Database.Synchronize.InitialSchemaSync.ScriptRegion.Execute(SqlConnection connection, SqlTransaction transaction)
ClientConnectionId:553b6dfa-52f4-421e-97da-7ce1782c9881
Error Number:208,State:1,Class:16 ---> System.Data.SqlClient.SqlException: Invalid object name '__AOSSTARTUPVERSION'.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Microsoft.Dynamics.AX.Framework.Database.Synchronize.InitialSchemaSync.ScriptRegion.ExecuteCommand(SqlCommand cmd)
   at Microsoft.Dynamics.AX.Framework.Database.Synchronize.InitialSchemaSync.ScriptRegion.Execute(SqlConnection connection, SqlTransaction transaction)
   --- End of inner exception stack trace ---
   at Microsoft.Dynamics.AX.Framework.Database.Synchronize.InitialSchemaSync.ScriptRegion.Execute(SqlConnection connection, SqlTransaction transaction)
   at Microsoft.Dynamics.AX.Framework.Database.Synchronize.InitialSchemaSync.RunSync()
   at Microsoft.Dynamics.AX.Framework.Database.Tools.StaticSchema.RunStaticUpdate(String sqlConnectionString, String binDir, Boolean skipRegionHashing)
   at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.InitialSchemaSync()
   at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.PartialSync()
   at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.RunSync()
   at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.Run(String metadataDirectory, String sqlConnectionString, SyncOptions options)
08/05/2020 20:15:18: Sync step name: PartialList, InitialSchema, PostTableViewSyncActions, KPIs, PartialSecurity, ADEs
08/05/2020 20:15:18: Start datetime: 2020-08-05 20:14:59
08/05/2020 20:15:18: End datetime: 2020-08-05 20:15:18
08/05/2020 20:15:18: Success: no
08/05/2020 20:15:18: PITR required for Rollback?: no
08/05/2020 20:15:18: DBSync required for Rollback?: no
08/05/2020 20:15:18: Is custom action failure?: no
08/05/2020 20:15:18: The operation failed.

ErrorBU.png

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,210 Super User 2025 Season 2 on at

    Hi Rhushikesh,

    I haven't seen this before. It is mentioning an error because of a missing or invalid object name '__AOSSTARTUPVERSION'.

    I would suggest to log an incident for Microsoft Support.

  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Rhushikesh,

    Could you please give me the version of AX 2012 being upgraded?

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
Abhilash Warrier Profile Picture

Abhilash Warrier 669 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

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

#3
Martin Dráb Profile Picture

Martin Dráb 423 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans