How to Fix "Ora-02048" with TransactionScope is Required

148 Views Asked by At

I am receiving

ORA-02048: attempt to begin distributed transaction without logging

with TransactionScope with TransactionScopeOption is Required.

I am testing the usage of TransactionScope with Required Option or requireNew Option for a very simple insert using devart dotconnect for oracle.

using(TransactionScope s = new TransactionScope(TransactionScopeOption.Required))
{
   var temp = new temp {attr1=value1};
   _dbcontext.Temps.add(temp); //<<where the issue comes
   _dbcontext.SaveChanges();
   s.Complete();
}

How would i solve this issue, am i missing anything? I have tried it with Suppress and it worked fine, but as i understood, suppress is like there is no transaction at all, and it will not rollback on fail.

0

There are 0 best solutions below