Upgrade from v3 to v5 SQL problem

I’m using 3.0.35Beta now. I wanted to upgrade to v5 and tried upgrading v4 and then v5 respectively just like described at this link :
https://sambapos.gitbooks.io/sambapos-v5-pro-dokumantasyon/content/kurulum/v3_veya_v4_den_v5_e_veritabani_gecisi.html

I’m getting this error at start;
“This sqltransaction has completed; it is no longer usable.”
and program closes immediately.

My backup has taken while the work period was open. I’m getting same upgrading either v3 to v4 or v3 to v5.

Any ideas???

I’m using SQL EXPRESS 2012.

You cant do V3 to V5 you need to ensure you upgrade to the latest version of V3, then upgrade to the last version of V4 then upgrade to V5

If you follow the tutorial exactly it should work, are you upgrading to the last version of each before trying to upgrade to the next version?

Yes exactly same. I tried to upgrade from V3 to V4 and then from V4 to V5. But each time I got same error. I googled for this error but couldn’t find a solution.

Look for the Log files and post their contents in the forum.

[Documents]\SambaPOS4\log.txt
[Documents]\SambaPOS5\log.txt

I can only guess that the error you are receiving is due to DB updates (upgrades) being done in the background when SambaPOS starts. Only @emre might be able to help with that since the updates are done inside the application on the first run after an upgrade.

Upgrading log.txt from V3 to V4

[Exception Info 1]

Top-level Exception
Type: System.InvalidOperationException
Message: This SqlTransaction has completed; it is no longer usable.
Source: System.Data
Stack Trace: at System.Data.SqlClient.SqlTransaction.ZombieCheck()
at System.Data.SqlClient.SqlTransaction.Rollback()
at FluentMigrator.Runner.Processors.GenericProcessorBase.RollbackTransaction()
at FluentMigrator.Runner.Processors.GenericProcessorBase.Dispose(Boolean isDisposing)
at FluentMigrator.Runner.Processors.ProcessorBase.Dispose()
at FluentMigrator.Runner.Initialization.TaskExecutor.Execute()
at Samba.Persistance.Data.Migrator.DoMigrate(String connectionString)
at Samba.Persistance.Data.Migrator.DoMigrate(CommonDbContext context)
at Samba.Persistance.Data.Initializer.Migrate(CommonDbContext context)
at Samba.Persistance.Data.Initializer.InitializeDatabase(DataContext context)
at System.Data.Entity.Database.<>c__DisplayClass21.<SetInitializerInternal>b__0(DbContext c) at System.Data.Entity.Internal.InternalContext.<>c__DisplayClass8.<PerformDatabaseInitialization>b__6() at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) at System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() at System.Data.Entity.Internal.LazyInternalContext.<InitializeDatabase>b__4(InternalContext c) at System.Data.Entity.Internal.RetryAction1.PerformAction(TInput input)
at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action)
at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase()
at System.Data.Entity.Internal.InternalContext.ForceOSpaceLoadingForKnownEntityTypes()
at System.Data.Entity.DbContext.System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext()
at Samba.Infrastructure.Data.SqlData.EFWorkspace…ctor(CommonDbContext context)
at Samba.Persistance.Data.WorkspaceFactory.Create()
at Samba.Presentation.Services.Common.DataGeneration.DataCreationService…ctor()
at Samba.Presentation.Bootstrapper.InitializeShell()

Can @emre help me about this error?

Any advice? Still have problem with upgrading :frowning:

did you tried this How to use V3 database with V4?

You werent using CE with v3 or something were you?

I tried upgrading from v3 to v4 (both are last version) once again. I got this error log. Any ideas? @emre

I’ll try to ugrade from v3 to v5 directly. I’ll post the result here.

Please help me @emre

[Exception Info 1]

Top-level Exception
Type: System.Exception
Message: An error occured executing the following sql:
CREATE NONCLUSTERED INDEX IX_AccountTransactionValues_AccountId ON AccountTransactionValues (AccountId) INCLUDE (Id,AccountTransactionId,AccountTransactionDocumentId,AccountTypeId,Date,Debit,Credit,Exchange,Name)
The error was Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Source: FluentMigrator.Runner
Stack Trace: at FluentMigrator.Runner.Processors.SqlServer.SqlServerProcessor.ExecuteNonQuery(String sql)
at FluentMigrator.Runner.Processors.SqlServer.SqlServerProcessor.Process(String sql)
at FluentMigrator.Runner.Processors.SqlServer.SqlServerProcessor.Execute(String template, Object[] args)
at FluentMigrator.Expressions.ExecuteSqlStatementExpression.ExecuteWith(IMigrationProcessor processor)
at FluentMigrator.Runner.MigrationRunner.<>c__DisplayClass1f.b__1c()
at FluentMigrator.Runner.MigrationRunner.AnnounceTime(String message, Action action)
at FluentMigrator.Runner.MigrationRunner.ExecuteExpressions(ICollection1 expressions) at FluentMigrator.Runner.MigrationRunner.ExecuteMigration(IMigration migration, Action2 getExpressions)
at FluentMigrator.Runner.MigrationRunner.ApplyMigrationUp(IMigrationInfo migrationInfo, Boolean useTransaction)
at FluentMigrator.Runner.MigrationRunner.MigrateUp(Boolean useAutomaticTransactionManagement)
at FluentMigrator.Runner.MigrationRunner.MigrateUp()
at FluentMigrator.Runner.Initialization.TaskExecutor.Execute()
at Samba.Persistance.Data.Migrator.DoMigrate(String connectionString)
at Samba.Persistance.Data.Migrator.DoMigrate(CommonDbContext context)
at Samba.Persistance.Data.Initializer.Migrate(CommonDbContext context)
at Samba.Persistance.Data.Initializer.InitializeDatabase(DataContext context)
at System.Data.Entity.Database.<>c__DisplayClass21.<SetInitializerInternal>b__0(DbContext c) at System.Data.Entity.Internal.InternalContext.<>c__DisplayClass8.<PerformDatabaseInitialization>b__6() at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) at System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() at System.Data.Entity.Internal.LazyInternalContext.<InitializeDatabase>b__4(InternalContext c) at System.Data.Entity.Internal.RetryAction1.PerformAction(TInput input)
at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action)
at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase()
at System.Data.Entity.Internal.InternalContext.ForceOSpaceLoadingForKnownEntityTypes()
at System.Data.Entity.DbContext.System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext()
at Samba.Infrastructure.Data.SqlData.EFWorkspace…ctor(CommonDbContext context)
at Samba.Persistance.Data.WorkspaceFactory.Create()
at Samba.Presentation.Services.Common.DataGeneration.DataCreationService…ctor()
at Samba.Presentation.Bootstrapper.InitializeShell()

Inner Exception 1
Type: System.Data.SqlClient.SqlException
Message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Source: .Net SqlClient Data Provider
Stack Trace: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 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 asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at FluentMigrator.Runner.Processors.SqlServer.SqlServerProcessor.ExecuteNonQuery(String sql)

Inner Exception 2
Type: System.ComponentModel.Win32Exception
Message: The wait operation timed out

You cant upgrade from V3 to V5 directly you need to upgrade to V4 then to V5

I’m getting same while trying to upgrade from v3 to v4 and from v3 to v5 directly.

What database type were you using in v3?
I don’t know what the options are but know v5 no longer supports CE which v3 did, not sure about v4.
Maybe that could be a factor.
If so you want to look at the part on kendashs sql tutorial covering CE to SQL conversion.

To be honest you might just be better if to build fresh v5 setup.

I’m using SQL Express for v3 and have about 2 years data. I’m trying to upgrade on SQL Express as well. Not using CE.