ORA-03113 on dock removal

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Valgardur
Posts: 165
Joined: Tue 24 Nov 2009 19:33

ORA-03113 on dock removal

Post by Valgardur » Tue 19 Sep 2017 17:54

My users get ORA-03113 (End-Of-File communications) error when removing their computers from their docking station.
Perhaps not unexpectedly, as they are losing their network session and connecting to the WiFi.
However this results in endless "External exception" errors (or probably one for every open dataset).
I have tried to reconnect, set local failover... without success. Is there any way to reset the connection and refresh the datasets? This also happens in some cases when the application has been idle for some time, although I can catch most of those with a timer.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: ORA-03113 on dock removal

Post by MaximG » Wed 20 Sep 2017 07:16

You are absolutely right. The cause of ORA-01113 error in your case is the issue of network interaction between the client and the server - physical disconnection of the network when removing their computers from their docking station or the unstable operation of WiFi connection.
In the first case, there is no way to reuse the corrupted connection. To continue work, you need to create a connection to the Oracle server again.
In the case of unstable networks, ODAC offers a solution that is described in detail in the documentation: https://www.devart.com/odac/docs/?unstable_network.htm

Valgardur
Posts: 165
Joined: Tue 24 Nov 2009 19:33

Re: ORA-03113 on dock removal

Post by Valgardur » Wed 20 Sep 2017 10:45

Thank you for a quick and detailed reply..
There is however, no available link for the FailOver demo.
The network connection is not unstable, as such, the user is simply switching.
In our situation there are no updates pending, no master detail datasets, no active transaction (or at least if there are we can accept an error).
I have tried various settings of the parameters / options and event handling... but I am not yet able to close the invalid database connection, connect again and reopen datasets that are open [there are lot of open datasets]... One idea is to iterate through all datasets, check if they had been active, and re-open on a new connection.
So is there no way to close the invalid connection, open a new one and automatically open all previously open datasets?

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: ORA-03113 on dock removal

Post by MaximG » Wed 20 Sep 2017 12:19

You can find the FailOver demo in the folder [ODAC install folder]\Demos\Miscellaneous\FailOver\
Please specify what connection after the client physical disconnection you cannot close: in the client program or on the Oracle server.
To investigate the possibility of realizing the described behavior, compose and send us a small sample that visually demonstrates,
which datasets (or dataset) you want to reopen after a connection failure. You can do this using the
e-support form (https://www.devart.com the "Support"\"Request Support" menu

Valgardur
Posts: 165
Joined: Tue 24 Nov 2009 19:33

Re: ORA-03113 on dock removal

Post by Valgardur » Wed 20 Sep 2017 13:34

Again, thanks for a quick reply.
I am not sure about your question, as I said, the user removes his computer from the dock, so this is a client application using a direct connection.
There are 150 possible datasets open, usually though less than 10 at any moment, but there is no way to know exactly what is open at any given time.
There is probably too much work involved in creating a realistic example, possibly I can simply add the option to close all datasets as well as the connection, store in memory and reopen.
But before that, to be absolutely certain, there is no way to detect lost connection, reconnect and automatically refresh all datasets?

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: ORA-03113 on dock removal

Post by MaximG » Mon 25 Sep 2017 08:11

You can implement the behavior after the ORA-03113 error occurs and which you are interested in by using the OraSession.OnError event handler : https://www.devart.com/odac/docs/?devar ... nerror.htm

Post Reply