InitialLOBFetchSize in Direct mode: ORA-03106
InitialLOBFetchSize in Direct mode: ORA-03106
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
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
Thank you for your report. We have reproduced the issue and are investigating it.
Re: InitialLOBFetchSize in Direct mode: ORA-03106
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??
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
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
This works and is definitely speeding things up. Thank you!
-
- Posts: 6
- Joined: Tue 12 May 2020 08:50
Re: InitialLOBFetchSize in Direct mode: ORA-03106
I still have the same error when using ef core... with version 9.12.1054
Re: InitialLOBFetchSize in Direct mode: ORA-03106
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.[email protected] wrote: ↑Mon 20 Jul 2020 09:56I still have the same error when using ef core... with version 9.12.1054
As a temporary workaround, downgrade to v9.11.1034.
Re: InitialLOBFetchSize in Direct mode: ORA-03106
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.
We will notify you when the new public build of dotConnect for Oracle is available for download.
Re: InitialLOBFetchSize in Direct mode: ORA-03106
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
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
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
The issue is fixed in the latest build - dotConnect for Oracle 9.14.1204
https://www.devart.com/dotconnect/oracle/download.html
https://www.devart.com/dotconnect/oracle/download.html
Re: InitialLOBFetchSize in Direct mode: ORA-03106
Hi, thanks - with 9.14.1204, UTF-8 in combination with InitialLobFetchSize > 0 is running smoothly :)