ORA-03106 Fatal two-task communication protocol error

Jim Ashton

Member²
In my Delphi 5 application users can tick boxes on a screen and hit a button to run a query based on their selections.

A new table is first created by building an SQL text string in a TOracleQuery object (eg 'create table X as select count (*), col_a, col_b from...where...group by col_a, col_b').

A TOracleDataset is then used to query the data in this table ('select * from X order by 2,3') for input to a QuickReport.

This module has recently been converted to DOA from a BDE-based Oracle connection. So far as I am aware the older version does not have any problems with my current Oracle installation (8.1.7).

In a session with the DOA version the first request runs fine and the results are correct. If the selections (col_a, col_b) are then changed the 2nd request completes and the data values are correct but typically the column headings (also selection-determined at runtime) are wrong & unchanged from the 1st request. Obviously this could be a bug in the code for the QuickReport, though frankly I don't see how(hasn't changed since BDE version).

A third request, again with changed columns, almost always gives the ORA-03106 error when the TOracleDatset is opened.

I have used 3rd party tools (Quest SQLNavigator) to confirm that the first step always works ie the table is created correctly with the right column headings & data.

Help please!

Thanks
Jim
 
I think that this ORA-03106 exception is probably a configuration issue. Can you reproduce this on more than one configuration?

------------------
Marco Kalter
Allround Automations
 
I'm not sure what you're driving at here.

I've been working with a number of Delphi 5 projects in my current hardware/OS/Oracle environment for several months (in fact a couple of years) now and I have not seen this error before. Admittedly, DOA components were introduced into the mix relatively recently.

The fact that the BDE version of this particular program (together with the BDE and DOA versions of several others) works just fine surely implies no incompatibilities to speak of. Likewise my ability to run the offending queries successfully using other tools.

Which aspect of the *configuration* do you suggest I change to test your hypothesis?

Thanks
Jim
 
Different applications will execute different SQL statements. Perhaps the combination of Direct Oracle Access and this QuickReport cause a specific SQL statement that lead to this ORA-03106 exception.

Note that ORA-03106 is by definition a low-level communication error, typically caused by client/server compatibility issues. Therefore a "different configuration" would be a different Client PC and/or Oracle Server.

If your PC has Multiple Oracle Homes, you could use the Oracle Home Selector (a standard Oracle utility) to select a different Primary Oracle Home. The Primary Oracle Home is listed first in the PATH environment variable, and will be used by Direct Oracle Access.

------------------
Marco Kalter
Allround Automations
 
I could take issue with these suggestions (the QuickReport hasn't been built when the query executes, the DOA & BDE versions issue identical SQL anyway...) and my PC doesn't have multiple Oracle Homes.

However I have stumbled upon a workaround which is to issue the query 'select 1 from dual' after the 1st query builds the table and before the 2nd selects from it. This is using the same TOracleDataset as the latter.

Doing this makes the problem go away - the report headings are correct on the 2nd & subsequent requests, and no Oracle error is now raised.

If this is a configuration issue as you suggest, it may very well be that the error would never have occurred at my customer's site anyway - either way I'm now relaxed about this.

I would however be interested in any further comments you may have.

Thanks.
 
Perhaps you can try this? Remove the work around and try it at your customer's site (or on a different PC)? This should confirm whether this is a configuration issue or not.

------------------
Marco Kalter
Allround Automations
 
Back
Top