InitialLOBFetchSize in Direct mode: ORA-03106

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
martinst
Posts: 6
Joined: Thu 26 Mar 2020 12:39

InitialLOBFetchSize in Direct mode: ORA-03106

Post by martinst » Thu 26 Mar 2020 12:53

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

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: InitialLOBFetchSize in Direct mode: ORA-03106

Post by Shalex » Fri 27 Mar 2020 21:18

Thank you for your report. We have reproduced the issue and are investigating it.

martinst
Posts: 6
Joined: Thu 26 Mar 2020 12:39

Re: InitialLOBFetchSize in Direct mode: ORA-03106

Post by martinst » Wed 01 Apr 2020 08:30

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??

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: InitialLOBFetchSize in Direct mode: ORA-03106

Post by Shalex » Sat 20 Jun 2020 19:50

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.

martinst
Posts: 6
Joined: Thu 26 Mar 2020 12:39

Re: InitialLOBFetchSize in Direct mode: ORA-03106

Post by martinst » Tue 23 Jun 2020 06:11

This works and is definitely speeding things up. Thank you!

[email protected]
Posts: 6
Joined: Tue 12 May 2020 08:50

Re: InitialLOBFetchSize in Direct mode: ORA-03106

Post by [email protected] » Mon 20 Jul 2020 09:56

I still have the same error when using ef core... with version 9.12.1054

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: InitialLOBFetchSize in Direct mode: ORA-03106

Post by Shalex » Tue 21 Jul 2020 13:57

[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.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: InitialLOBFetchSize in Direct mode: ORA-03106

Post by Shalex » Thu 23 Jul 2020 11:46

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.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: InitialLOBFetchSize in Direct mode: ORA-03106

Post by Shalex » Fri 31 Jul 2020 18:01

New build of dotConnect for Oracle 9.12.1064 is available for download now: viewtopic.php?f=1&t=41450.

martinst
Posts: 6
Joined: Thu 26 Mar 2020 12:39

Re: InitialLOBFetchSize in Direct mode: ORA-03106

Post by martinst » Thu 07 Jan 2021 17:45

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

DmitryGm
Devart Team
Posts: 152
Joined: Fri 11 Dec 2020 10:27

Re: InitialLOBFetchSize in Direct mode: ORA-03106

Post by DmitryGm » Wed 13 Jan 2021 10:00

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.

DmitryGm
Devart Team
Posts: 152
Joined: Fri 11 Dec 2020 10:27

Re: InitialLOBFetchSize in Direct mode: ORA-03106

Post by DmitryGm » Thu 18 Feb 2021 14:53

The issue is fixed in the latest build - dotConnect for Oracle 9.14.1204
https://www.devart.com/dotconnect/oracle/download.html

martinst
Posts: 6
Joined: Thu 26 Mar 2020 12:39

Re: InitialLOBFetchSize in Direct mode: ORA-03106

Post by martinst » Wed 03 Mar 2021 10:00

Hi, thanks - with 9.14.1204, UTF-8 in combination with InitialLobFetchSize > 0 is running smoothly :)

Post Reply