I'm calling a procedure (from C# via ODP.Net with Oracle.DataAccess.dll 4.112.3.0 to OracleDB 11.2.0.1 with some patches) that has an OUT SYS_REFCURSOR
(let's call it pCursorOut
). In the procedure, I do this:
OPEN pCursorOut FOR SELECT ... FOR UPDATE SKIP LOCKED;
My C# code:
var oracleDataReader = oracleCommand.ExecuteDataReader();
dataTable.Load(oracleDataReader);
Calling Load()
results in an OracleException
:
ORA-03113: end-of-file on communication channel
If I remove the FOR UPDATE SKIP LOCKED
, it works correctly (other than not locking the records, which I need).
Could this be a version conflict?
How can this be solved?
UPDATE: I suspect this may be because I'm trying to lock more than one record at a time with the table load. I'm doing some additional testing on this now... NOPE. That's not it. Doing a yield return
on a while (oracleDataReader.Read())
throws the same thing on the first .Read()
call.
Turns out it was a versioning conflict. I upgraded to OracleDB 11.2.0.3, and it started working as expected.