Recovering From Connection Loss

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Manfredt
Posts: 5
Joined: Tue 21 Jul 2009 19:01

Recovering From Connection Loss

Post by Manfredt » Tue 14 Sep 2010 09:56

How can I recover from connection loss when using the
TOraSession object and continue working? I am
also getting "Net Error 204" message too frequently, what could
be the cause of this and how can I fix this problem?
I am desperate please help.

Manfredt Kavetu

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Tue 14 Sep 2010 11:20

Hello,

For recovered connection you can use the Disconnect Mode. See the Working with Disconnected Mode and Working in an Unstable Network topic in the ODAC help for more information.

When exactly do you receive the error (e.g. when you open a connection or on a command execution)?

Please send me the following information:
- the exact version of ODAC.
- the exact version of Oracle server and client.

Manfredt
Posts: 5
Joined: Tue 21 Jul 2009 19:01

Recovering From Connection Loss

Post by Manfredt » Tue 14 Sep 2010 12:31

Thanks for your reply. I am using ODAC version
6.90.0.52 for Delphi RAD Architect 2010 in Direct mode in a thin-tier
architect where the ODAC components are only used on the
application server. Our application is designed using
RealThinClient components in a Multi-Threaded mode.
We are using Oracle 10g on Linux.

Since the ODAC components are used on the server it is
difficult to tell when the error happens because we have
about five concurrent users, some browsing data, others
capturing data into the Oracle database.

TOrasession is configured this way:

DisconnectedMode = True
Pooling = True (was False before)
Direct = True
LocalFailOver = True
ThreadSafety = True (it was False before)

In the OnConnectionLost Event i have this code:

RetryMode := rmReconnectExecute;

Should I switch to not use TOrasession in direct mode, if so where
can I download the Oracle client?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Tue 14 Sep 2010 14:12

Hello,

In your case probably one connection is used by several threads simultaneously.
In Direct mode, we do not guarantee complete thread safety and recommend setting up a separate Connection for each thread that uses ODAC.

You can download Oracle Client from the official Oracle site (http://www.oracle.com)

Post Reply