I am getting ORA-02049 occasionally for some long-running and/or intensive transactions. There is seemingly no pattern to this, but it happens on a simple INSERT.
I
Ok, this was a silly problem.
We are using Entity Framework 6.0 (upgraded to 6.2, but no change), Oracle.ManagedDataAccess +EntityFramework 12.2.1100, .NET 4.5.
I was getting ORA-02049: timeout: distributed transaction waiting for lock with the following query:
update "schemaname"."tablename"
set "DUE_DATE" = :p0
where ("ID" = :p1)
(via EF context.Database.Log event). A really simple query, shouldn't have any issues.
Well, I was using the same login on the remote server, on my local debugger, and in Oracle SQL Developer. A co-worker pointed out I should kill all these multiple connections while debugging .... and it worked. So the solution in my case was not to connect to the database multiple times with the same login.