question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Migrations don't work anymore (2.3.0, Oracle)

See original GitHub issue

Apologies that I am not (can not) use the latest version of Abp, and that I am using Oracle which you don’t usually support, but I could use some direction as to where the problem might be.

I have made a simple migration, which works completely fine through the Package-Manager-Console, but when trying to migration on Application startup, it fails, citing that it already has made a connection and can’t make another:

Connection is already part of a local or a distributed transaction

Oracle.ManagedDataAccess.Client.OracleConnection.BeginTransaction(IsolationLevel isolationLevel) +378 Oracle.ManagedDataAccess.Client.OracleConnection.BeginDbTransaction(IsolationLevel isolationLevel) +130 System.Data.Common.DbConnection.BeginTransaction(IsolationLevel isolationLevel) +10 System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.<BeginTransaction>b__0(DbConnection t, BeginTransactionInterceptionContext c) +9 System.Data.Entity.Infrastructure.Interception.InternalDispatcher1.Dispatch(TTarget target, Func3 operation, TInterceptionContext interceptionContext, Action3 executing, Action3 executed) +576 System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.BeginTransaction(DbConnection connection, BeginTransactionInterceptionContext interceptionContext) +341 System.Data.Entity.Migrations.DbMigrator.ExecuteStatementsWithinNewTransaction(IEnumerable1 migrationStatements, DbConnection connection, DbInterceptionContext interceptionContext) +138 System.Data.Entity.Migrations.DbMigrator.ExecuteStatementsInternal(IEnumerable1 migrationStatements, DbConnection connection, DbInterceptionContext interceptionContext) +346 System.Data.Entity.Migrations.DbMigrator.ExecuteStatementsInternal(IEnumerable1 migrationStatements, DbConnection connection) +509 System.Data.Entity.Migrations.<>c__DisplayClass30.<ExecuteStatements>b__2e() +19 System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute(Action operation) +9 System.Data.Entity.Migrations.DbMigrator.ExecuteStatements(IEnumerable1 migrationStatements, DbTransaction existingTransaction) +194 System.Data.Entity.Migrations.DbMigrator.ExecuteStatements(IEnumerable1 migrationStatements) +7 System.Data.Entity.Migrations.DbMigrator.ExecuteOperations(String migrationId, VersionedModel targetModel, IEnumerable1 operations, IEnumerable1 systemOperations, Boolean downgrading, Boolean auto) +828 System.Data.Entity.Migrations.DbMigrator.ApplyMigration(DbMigration migration, DbMigration lastMigration) +364 System.Data.Entity.Migrations.DbMigrator.Upgrade(IEnumerable1 pendingMigrations, String targetMigrationId, String lastMigrationId) +133 System.Data.Entity.Migrations.DbMigrator.UpdateInternal(String targetMigration) +446 System.Data.Entity.Migrations.<>c__DisplayClassc.<Update>b__b() +13 System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists(Action mustSucceedToKeepDatabase) +422 System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration) +78 System.Data.Entity.MigrateDatabaseToLatestVersion2.InitializeDatabase(TContext context) +108 System.Data.Entity.Internal.<>c__DisplayClassf1.<CreateInitializationAction>b__e() +76 System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) +60 System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() +357 System.Data.Entity.Internal.LazyInternalContext.<InitializeDatabase>b__4(InternalContext c) +7 System.Data.Entity.Internal.RetryAction1.PerformAction(TInput input) +110 System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action1 action) +198 System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase() +73 System.Data.Entity.Internal.InternalContext.ForceOSpaceLoadingForKnownEntityTypes() +60 System.Data.Entity.DbContext.System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext() +25 Abp.EntityFramework.AbpDbContext.RegisterToChanges() +27 Abp.Zero.EntityFramework.AbpZeroDbContext3…ctor(String nameOrConnectionString) +29 Project.EntityFramework.ProjectDbContext…ctor(String nameOrConnectionString) in C:\User\Project.EntityFramework\EntityFramework\ProjectAbpContext.cs:176 `

I am really quite stuck. Do you know why there might already be another connection at this point?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:29 (29 by maintainers)

github_iconTop GitHub Comments

1reaction
ismcagdascommented, Oct 5, 2017

@Worthy7 it seems like oracle does not support ReadUnCommitted isolation level. You can change IsolationLevel in your EF module’s preinitialize like this:

Configuration.UnitOfWork.IsolationLevel = IsolationLevel.ReadCommitted;

0reactions
worthy7commented, Nov 15, 2017

I dropped down to old old versions of my app which worked fine, and even they couldn’t migrate automatically. So it is nothing to do with the .net project at all - it must be something external. I’ll close this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

10.1.2.3 Patchset for Oracle Application Server 10g Release 2
While migrating a repository, cache are maintained to move objects from one repository to another. This cache was not cleared properly for the ......
Read more >
3 Migrating Your Application to MAF 2.3.0
This chapter provides information about migrating applications created using earlier releases of MAF to MAF 2.3.0.
Read more >
Oracle 10g upgrade - Ask TOM
I don't see an issue in making it 10g on the destination linux box.. however, the problem is how to migrate the huge...
Read more >
Strings of Zero Length Not Equivalent To NULL - Ask TOM
A string of zero length ('') is not equivalent to a NULL value. ... I am reviewing the Oracle 9i migration documents and...
Read more >
3 Upgrade and Migration Issues for Oracle Identity and ...
This chapter describes issues associated with the upgrade and migration process of Oracle Identity and Access Management 11g Release 2 (11.1.2.3.0).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found