ORA-8177

ORA-8177

Postby 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;
JoeRuspante
 
Posts: 54
Joined: Mon 05 Jul 2010 23:08

Re: ORA-8177

Postby 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.
Shalex
Devart Team
 
Posts: 7460
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle