Page 1 of 1

InitialLOBFetchSize in Direct mode: ORA-03106

Posted: Thu 26 Mar 2020 12:53
by martinst
Hi,

the release notes of version 9.6.597 say "The bug with the ORA-03106 error when assigning a value to the OracleCommand InitialLobFetchSize property in the Direct mode is fixed".

We use version 9.10.909, so the issue should be able to assign values to InitialLobFetchSize.
We have the issue that by default (InitialLobFetchSize = 0), loading BLOBs is very slow. I can set InitialLobFetchSize = -1; the code then still works but does not show any performance improvement.

If I set InitialLobFetchSize to any value > 0 (e.g. InitialLobFetchSize = 65536) the SQL select can be executed (OracleCommand.ExecuteReader()) but when trying to get the results with OracleDataReader.Read() I get an ORA-03106 error.

If I disable direct mode, InitialLobFetchSize = 65536 works perfectly and is a lot faster than the default; however, we would prefer direct mode to avoid dependency on an Oracle client.

Any suggestions or solutions to this issue? Note: we are still using .NET 4.5.2 (customers' requirement); database is Oracle 12c.

Best regards,
Martin

Re: InitialLOBFetchSize in Direct mode: ORA-03106

Posted: Fri 27 Mar 2020 21:18
by Shalex
Thank you for your report. We have reproduced the issue and are investigating it.

Re: InitialLOBFetchSize in Direct mode: ORA-03106

Posted: Wed 01 Apr 2020 08:30
by martinst
Thanks! It would be great to have a solution for this since we would like to use direct mode to avoid dependency on any Oracle Instant Client.

I have one more suggestion: I understand that this is a property of the OracleCommand class; however, would it be possible to add this as a connection string parameter so that all commands created by this connection use the value of the connection? That would make it very easy to load LOB data with Entity Framework fast.

Would that actually be possible or is it not recommendable for some reason to open every connection with InitialLobFetchSize > 0 even if no LOB data is loaded??

Re: InitialLOBFetchSize in Direct mode: ORA-03106

Posted: Sat 20 Jun 2020 19:50
by Shalex
The bug with throwing "ORA-03106: fatal two-task communication protocol error", when OracleCommand.InitialLobFetchSize is set to non-zero value, in the Direct mode is fixed in dotConnect for Oracle v9.11.1034: viewtopic.php?f=1&t=41287.

Re: InitialLOBFetchSize in Direct mode: ORA-03106

Posted: Tue 23 Jun 2020 06:11
by martinst
This works and is definitely speeding things up. Thank you!

Re: InitialLOBFetchSize in Direct mode: ORA-03106

Posted: Mon 20 Jul 2020 09:56
I still have the same error when using ef core... with version 9.12.1054

Re: InitialLOBFetchSize in Direct mode: ORA-03106

Posted: Tue 21 Jul 2020 13:57
by Shalex
[email protected] wrote: Mon 20 Jul 2020 09:56I still have the same error when using ef core... with version 9.12.1054
We have reproduced "ORA-03106: fatal two-task communication protocol error" with CLOB in a joined query and will notify you when it is fixed.

As a temporary workaround, downgrade to v9.11.1034.

Re: InitialLOBFetchSize in Direct mode: ORA-03106

Posted: Thu 23 Jul 2020 11:46
by Shalex
The bug with throwing "ORA-03106: fatal two-task communication protocol error" on SELECT queries in the Direct mode is fixed.

We will notify you when the new public build of dotConnect for Oracle is available for download.

Re: InitialLOBFetchSize in Direct mode: ORA-03106

Posted: Fri 31 Jul 2020 18:01
by Shalex
New build of dotConnect for Oracle 9.12.1064 is available for download now: viewtopic.php?f=1&t=41450.

Re: InitialLOBFetchSize in Direct mode: ORA-03106

Posted: Thu 07 Jan 2021 17:45
by martinst
Dear DevArt-Team,

we are now using dotConnect for Oracle 9.14.1160 and have the following issue:

When loading data from a CLOB column using the OracleDataAdapter from a unicode databases (NLS_CHAR: AL32UTF8, NLS_NCHAR: AL16UTF16) and InitialLobFetchSize > 0, we receive invalid data and it seems that the data from the CLOB (UTF-16?) is interpreted as ANSI.

As an example what happens: the German word "Örtlichkeit" becomes "\0�\0r\0t\0l\0i\0c\0h\0k\0e\0i\0t\".

I am posting this here since it seems to be related with the topic: with InitialLobFetchSize = 0 everything works fine; the issue only appears with InitialLobFetchSize > 0 (we use 1MB).

varchar2 columns work perfectly fine within the same OracleDataAdapter instance, also CLOB data is loaded correctly when using an OracleDataReader. The issue only appears for OracleDataAdapter in combination with InitialLobFetchSize > 0.

This issue did not appear with version 9.13.1107.0.

Best regards,
Martin

Re: InitialLOBFetchSize in Direct mode: ORA-03106

Posted: Wed 13 Jan 2021 10:00
by DmitryGm
martinst wrote: Thu 07 Jan 2021 17:45 we are now using dotConnect for Oracle 9.14.1160 and have the following issue:
Thank you for your report.
The issue with InitialLobFetchSize and OracleDataAdapter has been reproduced.
Now we are investigating it.

Re: InitialLOBFetchSize in Direct mode: ORA-03106

Posted: Thu 18 Feb 2021 14:53
by DmitryGm
The issue is fixed in the latest build - dotConnect for Oracle 9.14.1204
https://www.devart.com/dotconnect/oracle/download.html

Re: InitialLOBFetchSize in Direct mode: ORA-03106

Posted: Wed 03 Mar 2021 10:00
by martinst
Hi, thanks - with 9.14.1204, UTF-8 in combination with InitialLobFetchSize > 0 is running smoothly :)