Inflectra Customer Forums: Restoring database backup causes errors (Thread) Im trying to restore a database backup from one SpiraTeam environment to another. I followed the instruction mentioned in the Q&A (running SQL scripts and changing the web.config, restoring the attachments directory). When I try to logon I get this error message (see stacktrace at the bottom): Exception Details: System.Data.SqlClient.SqlException: Invalid column name IS_BUSY. Invalid column name IS_AWAY. Invalid column name UNREAD_MESSAGES. Invalid column name AVATAR_MIME_TYPE. My assumption is that the backup file was from another version of SpiraTeam. The Database_Revision value is 400 in the backup I try to restore but 410 in the existing database Im trying to replace with the backup. I also tried to run the Update_v4.1.0.3 and the DatabasePatcher.exe to align the restored database with the new version of SpiraTeam but that results in the following error message: Error occurred during installation - ALTER TABLE ALTER COLUMN failed because column ESTIMATE_POINTS does not exist in table TST_REQUIREMENT. Does anyone know what Im doing wrong here? Stacktrace: [SqlException (0x80131904): Invalid column name IS_BUSY. Invalid column name IS_AWAY. Invalid column name UNREAD_MESSAGES. Invalid column name AVATAR_MIME_TYPE.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +404 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +412 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1363 System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +59 System.Data.SqlClient.SqlDataReader.get_MetaData() +118 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +6384561 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +6386130 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +538 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +28 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +256 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +19 EFTracingProvider.EFTracingCommand.ExecuteDbDataReader(CommandBehavior behavior) +476 System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) +553 [EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details.] System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) +10617111 System.Data.Objects.Internal.ObjectQueryExecutionPlan.Execute(ObjectContext context, ObjectParameterCollection parameterValues) +11457157 System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) +11090185 System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable .GetEnumerator() +47 System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source) +220 System.Linq.Queryable.FirstOrDefault(IQueryable`1 source) +383 Inflectra.SpiraTest.Business.UserManager.GetUserByLogin(String username, Boolean updateLastActivity, Boolean includeInActive) +1589 Inflectra.SpiraTest.Web.Classes.SpiraMembershipProvider.GetUser(String username, Boolean userIsOnline) +1855 System.Web.Security.Membership.GetUser(String username, Boolean userIsOnline) +175 Inflectra.SpiraTest.Web.ServerControls.LoginEx.LoginEx_LoggingIn(Object sender, LoginCancelEventArgs e) +105 System.Web.UI.WebControls.Login.AttemptLogin() +109 System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +93 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +52 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3707 en-US(C) Copyright 2006-2024 Inflectra Corporation.support@inflectra.com/Computers/Software/Project_Management//Computers/Software/Quality_Assurance/KronoDesksupport@inflectra.comhttp://www.inflectra.com/kronodesk/forums/threads120/Support/Forum/spirateam/issues-questions/856.aspxthreadId=856Valery Jacobs (valeryjacobs@hotmail.com) database restoredatabasepatcherupgradeRestoring database backup causes errors Im trying to restore a database backup from one SpiraTeam environment to another. I followed the instruction mentioned in the Q&A (running SQL scripts and changing the web.config, restoring the attachments directory). When I try to logon I get this error message (see stacktrace at the bottom): Exception Details: System.Data.SqlClient.SqlException: Invalid column name IS_BUSY. Invalid column name IS_AWAY. Invalid column name UNREAD_MESSAGES. Invalid column name AVATAR_MIME_TYPE. My assumption is that the backup file was from another version of SpiraTeam. The Database_Revision value is 400 in the backup I try to restore but 410 in the existing database Im trying to replace with the backup. I also tried to run the Update_v4.1.0.3 and the DatabasePatcher.exe to align the restored database with the new version of SpiraTeam but that results in the following error message: Error occurred during installation - ALTER TABLE ALTER COLUMN failed because column ESTIMATE_POINTS does not exist in table TST_REQUIREMENT. Does anyone know what Im doing wrong here? Stacktrace: [SqlException (0x80131904): Invalid column name IS_BUSY. Invalid column name IS_AWAY. Invalid column name UNREAD_MESSAGES. Invalid column name AVATAR_MIME_TYPE.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +404 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +412 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1363 System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +59 System.Data.SqlClient.SqlDataReader.get_MetaData() +118 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +6384561 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +6386130 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +538 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +28 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +256 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +19 EFTracingProvider.EFTracingCommand.ExecuteDbDataReader(CommandBehavior behavior) +476 System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) +553 [EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details.] System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) +10617111 System.Data.Objects.Internal.ObjectQueryExecutionPlan.Execute(ObjectContext context, ObjectParameterCollection parameterValues) +11457157 System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) +11090185 System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable .GetEnumerator() +47 System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source) +220 System.Linq.Queryable.FirstOrDefault(IQueryable`1 source) +383 Inflectra.SpiraTest.Business.UserManager.GetUserByLogin(String username, Boolean updateLastActivity, Boolean includeInActive) +1589 Inflectra.SpiraTest.Web.Classes.SpiraMembershipProvider.GetUser(String username, Boolean userIsOnline) +1855 System.Web.Security.Membership.GetUser(String username, Boolean userIsOnline) +175 Inflectra.SpiraTest.Web.ServerControls.LoginEx.LoginEx_LoggingIn(Object sender, LoginCancelEventArgs e) +105 System.Web.UI.WebControls.Login.AttemptLogin() +109 System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +93 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +52 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3707 Wed, 12 Mar 2014 15:54:43 -04002020-08-08T10:57:13-04:00/Support/Forum/spirateam/issues-questions/856.aspxmessageId=1559David J (support1@inflectra.com) Hi Valery You cannot migrate a v4.0 database into a v4.1 installation, the databases are not Hi Valery You cannot migrate a v4.0 database into a v4.1 installation, the databases are not compatible. You need to instead: Uninstall v4.1 from the new server Install v4.0 on the new server Delete the sample database Now restore back your v4.0 database Then run the v4.1 MSI installation package on top of your existing installation to upgrade the application and database to v4.1. Regards Adam Wed, 12 Mar 2014 22:49:28 -04002014-03-12T22:49:28-04:00/Support/Forum/spirateam/issues-questions/856.aspx#reply1559