Hi All,
I am in the process of migrating from BC14 to BC23/25. After publishing the apps and initiating the schema synchronization step, the process runs for more than 13–15 hours and eventually fails with a Nav Command Exception error.
Upon checking the Event Viewer, I found the error details below.
Message (NavSqlException): ParentException: NavSqlException
The following SQL error was unexpected:
Could not allocate a new page for database 'tempdb' because the 'PRIMARY' filegroup is full due to lack of storage space or database files reaching the maximum allowed size. Note that UNLIMITED files are still limited to 16TB. Create the necessary space by dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.
The statement has been terminated.
Could someone please help me understand how to resolve this issue? For reference, the database size is approximately 150 GB.
Below is the event view error
Server instance: BC230
Category: Sql
ClientSessionId: 00000000-0000-0000-0000-000000000000
ClientActivityId: 00000000-0000-0000-0000-000000000000
ServerSessionUniqueId: 0d6175c5-c615-4cd2-9131-c4d66b345c52
ServerActivityId: 0b91d335-efc6-46d9-aa59-6c417c2e031f
EventTime: 02/09/2026 18:43:46
Message (NavSqlException): ParentException: NavSqlException
The following SQL error was unexpected:
Could not allocate a new page for database 'tempdb' because the 'PRIMARY' filegroup is full due to lack of storage space or database files reaching the maximum allowed size. Note that UNLIMITED files are still limited to 16TB. Create the necessary space by dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.
The statement has been terminated.
SQL statement:
IF EXISTS(SELECT * FROM sysobjects WHERE id = OBJECT_ID(N'Federal Fund$Purch_ Inv_ Header') AND OBJECTPROPERTY(id, N'IsTable') = 1) AND NOT EXISTS (SELECT * FROM sys.columns WHERE object_id = OBJECT_ID(N'Federal Fund$Purch_ Inv_ Header') AND name = N'$systemId')BEGIN
ALTER TABLE [Federal Fund$Purch_ Inv_ Header] ADD [$systemId] [uniqueidentifier] NOT NULL CONSTRAINT "MDF$Federal Fund$Purch_ Inv_ Header$$systemId" DEFAULT NEWSEQUENTIALID() CONSTRAINT "Federal Fund$Purch_ Inv_ Header$$systemId" UNIQUE NONCLUSTERED ("$systemId")
END
StackTrace:
at System.Environment.get_StackTrace()
at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.ThrowNavSqlException(SqlExceptionAdapter exceptionAdapter, Boolean transactionNoLongerValid, String commandText, Boolean isLastExceptionARollbackCause, Boolean logExceptions, NavCancellationToken cancellationToken)
at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.MapException(SqlExceptionAdapter exceptionAdapter, String commandText, Boolean isRollbackAction, Nullable`1 timeout, NavCancellationToken cancellationToken)
at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.<>c__DisplayClass137_0`1.<ExecuteFunction>b__0()
at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.ExecuteFunctionWithTrace[T](EventTask task, Func`1 function, String commandText, SqlCommand sqlCommand, Boolean isAdoCommand, NavCancellationToken cancellationToken)
at Microsoft.Dynamics.Nav.Runtime.NavSqlCommand.ExecuteNonQueryImp(NavCancellationToken cancellationToken)
at Microsoft.Dynamics.Nav.Runtime.NavSqlSystemIdHelper.ExecuteAlterTableAddSystemIdColumn(String tableName, Boolean sharedSchema)
at Microsoft.Dynamics.Nav.Runtime.NavSqlSystemIdHelper.AddSystemIdColumnToTenantTables(Int32[] companyTokens, Boolean sharedSchema)
at Microsoft.Dynamics.Nav.Runtime.NavSqlDatabaseSync.AddSystemColumns(SynchronizationSetup syncSetup, NavSqlTenantPropertiesSync sqlTenantPropertiesSync, Int32[] companyTokens)
at Microsoft.Dynamics.Nav.Runtime.NavSqlDatabaseSync.SynchronizeTenantDatabase(NavSession session, SynchronizationSetup syncSetup, Boolean requireCollationUpdate)
at Microsoft.Dynamics.Nav.Runtime.NavSqlDatabaseSync.<>c__DisplayClass62_0.<SyncDatabaseIfNeeded>b__1(NavTenant tenant, NavSession systemSession)
at Microsoft.Dynamics.Nav.Runtime.NavTenant.Microsoft.Dynamics.Nav.Runtime.ITenantSessionHandler.RunTenantActionInSystemSession(Action`2 action, Boolean throwExceptions, Boolean useCurrentCulture, Boolean allowAppsDisabledMode, LanguageSetting language, NavCancellationToken cancellationToken)
at Microsoft.Dynamics.Nav.Runtime.NavSqlDatabaseSync.SyncDatabaseIfNeeded(SynchronizationSetup syncSetup)
at Microsoft.Dynamics.Nav.Runtime.NavSqlDatabaseSync.EnsureDatabaseInSync(SynchronizationSetup syncSetup)
at Microsoft.Dynamics.Nav.Runtime.NavSqlDatabaseSync.<>c__DisplayClass90_0.<StartSyncProcessIfNotAlreadyStarted>b__0()
at Microsoft.Dynamics.Nav.Runtime.NavSqlDatabaseSync.<>c__DisplayClass92_0.<StartProcessIfNotAlreadyStarted>b__0()
at Microsoft.Dynamics.Nav.Runtime.NavTaskFactory.<>c__DisplayClass0_0.<RunSynchronousOperationOnThreadPool>b__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
at System.Threading.Thread.StartCallback()
InnerException:
RootException: SqlException
Could not allocate a new page for database 'tempdb' because the 'PRIMARY' filegroup is full due to lack of storage space or database files reaching the maximum allowed size. Note that UNLIMITED files are still limited to 16TB. Create the necessary space by dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.
The statement has been terminated.
ExceptionStackTrace:
at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, SqlCommand command, Boolean callerHasConnectionLock, Boolean asyncClose)
at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at Microsoft.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean isAsync, Int32 timeout, Boolean asyncWrite)
at Microsoft.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String methodName)
at Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.<>c__DisplayClass137_0`1.<ExecuteFunction>b__0()
CallerStackTrace:
at Microsoft.Dynamics.Nav.Runtime.LogWriterHelper.LogExceptionEventWithTelemetry(NavDiagnostics diagnostic, String tag, Category category, Exception exception, Verbosity verbosity, EventLogEntryType eventLogEntryType)
at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.ThrowNavSqlException(SqlExceptionAdapter exceptionAdapter, Boolean transactionNoLongerValid, String commandText, Boolean isLastExceptionARollbackCause, Boolean logExceptions, NavCancellationToken cancellationToken)
at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.MapException(SqlExceptionAdapter exceptionAdapter, String commandText, Boolean isRollbackAction, Nullable`1 timeout, NavCancellationToken cancellationToken)
at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.<>c__DisplayClass137_0`1.<ExecuteFunction>b__0()
at Microsoft.Dynamics.Nav.Runtime.NavSqlConnection.ExecuteFunctionWithTrace[T](EventTask task, Func`1 function, String commandText, SqlCommand sqlCommand, Boolean isAdoCommand, NavCancellationToken cancellationToken)
at Microsoft.Dynamics.Nav.Runtime.NavSqlCommand.ExecuteNonQueryImp(NavCancellationToken cancellationToken)
at Microsoft.Dynamics.Nav.Runtime.NavSqlSystemIdHelper.ExecuteAlterTableAddSystemIdColumn(String tableName, Boolean sharedSchema)
at Microsoft.Dynamics.Nav.Runtime.NavSqlSystemIdHelper.AddSystemIdColumnToTenantTables(Int32[] companyTokens, Boolean sharedSchema)
at Microsoft.Dynamics.Nav.Runtime.NavSqlDatabaseSync.AddSystemColumns(SynchronizationSetup syncSetup, NavSqlTenantPropertiesSync sqlTenantPropertiesSync, Int32[] companyTokens)
at Microsoft.Dynamics.Nav.Runtime.NavSqlDatabaseSync.SynchronizeTenantDatabase(NavSession session, SynchronizationSetup syncSetup, Boolean requireCollationUpdate)
at Microsoft.Dynamics.Nav.Runtime.NavSqlDatabaseSync.<>c__DisplayClass62_0.<SyncDatabaseIfNeeded>b__1(NavTenant tenant, NavSession systemSession)
at Microsoft.Dynamics.Nav.Runtime.NavTenant.Microsoft.Dynamics.Nav.Runtime.ITenantSessionHandler.RunTenantActionInSystemSession(Action`2 action, Boolean throwExceptions, Boolean useCurrentCulture, Boolean allowAppsDisabledMode, LanguageSetting language, NavCancellationToken cancellationToken)
at Microsoft.Dynamics.Nav.Runtime.NavSqlDatabaseSync.SyncDatabaseIfNeeded(SynchronizationSetup syncSetup)
at Microsoft.Dynamics.Nav.Runtime.NavSqlDatabaseSync.EnsureDatabaseInSync(SynchronizationSetup syncSetup)
at Microsoft.Dynamics.Nav.Runtime.NavSqlDatabaseSync.<>c__DisplayClass90_0.<StartSyncProcessIfNotAlreadyStarted>b__0()
at Microsoft.Dynamics.Nav.Runtime.NavSqlDatabaseSync.<>c__DisplayClass92_0.<StartProcessIfNotAlreadyStarted>b__0()
at Microsoft.Dynamics.Nav.Runtime.NavTaskFactory.<>c__DisplayClass0_0.<RunSynchronousOperationOnThreadPool>b__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
at System.Threading.Thread.StartCallback()
ProcessId: 5100
Tag: 000018M
ThreadId: 9
CounterInformation:
CustomParameters: {
}
GatewayCorrelationId: