Skip Navigation LinksHome Page > Forums > SpiraTeam Forums > SpiraTeam Issues & Qu... > Restoring database backup...
I'm 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 I'm 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 I'm 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<T>.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
Hi Valery
You cannot migrate a v4.0 database into a v4.1 installation, the databases are not compatible.
You need to instead:
Regards
Adam
And if you have any questions, please email or call us at +1 (202) 558-6885