ORA-8177

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
JoeRuspante
Posts: 54
Joined: Mon 05 Jul 2010 23:08

ORA-8177

Post by JoeRuspante » Fri 28 Dec 2012 17:39

Hi everybody.

I'm using dotConnect for Oracle 7.4.142 and EntityFramework Code First (Runtime 4.5).
In a solution I'm reading xml files from a directory and update an Oracle's table.

This is a simply code:

Code: Select all


MyDbContext ctx = new MyDbContext();
foreach (var item in Directory.GetFiles(@"mydir", "*.xml")
{

   Customer c = new Customer();
   // Loading data into c variable from xml file
   ctx.Customers.Add(c);
   using (TransactionScope t = new TransactionScope())
   {
      ctx.SaveChanges();
      t.Complete();
   }

}


When I have a lot of files to elaborate in a same execution, the programm exit with "ORA-8177" error.

It seems a problem of the IsolationLevel used.

How can I change it?

PS: On MyDbContext I make some configurations by code...

Code: Select all



OracleEntityProviderConfig.Instance.CodeFirstOptions.UseNonUnicodeStrings = true;
OracleEntityProviderConfig.Instance.Workarounds.IgnoreSchemaName = true;
OracleEntityProviderConfig.Instance.Workarounds.IgnoreDboSchemaName = true;
OracleEntityProviderConfig.Instance.CodeFirstOptions.TruncateLongDefaultNames = true;
OracleEntityProviderConfig.Instance.CodeFirstOptions.UseDateTimeAsDate = true;
OracleEntityProviderConfig.Instance.Workarounds.DisableQuoting = true;
OracleEntityProviderConfig.Instance.Workarounds.ColumnTypeCasingConventionCompatibility = true;

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: ORA-8177

Post by Shalex » Sat 29 Dec 2012 13:15

JoeRuspante wrote:When I have a lot of files to elaborate in a same execution, the programm exit with "ORA-8177" error.
Are you using only one or several contexts within your TransactionScope in a real application?
1. If one: remove usage of TransactionScope at all because context employs transaction internally for the SaveChanges call and rolls back all changes if there is any error.
2. If several: set another IsolationLevel for TransactionScope via its constructor.

Post Reply