Transparent Application Failover Support --> some questions

Transparent Application Failover Support --> some questions

Postby goethals.f » Tue 11 Jan 2011 15:44

Hello,

I have some questions about the TAF-support in dotConnect. Possibly it could be that TAF is totally the wrong thing in our requirements.


Currently we are already using some years the corelab-devart-dotconnect and are really happy about it.

But we did have some discussion about what could happens with an active-open OracleConnection object, and for some reason the application can not reach the DB (Ex; DB down, network troubles,....)

If you execute a OracleReader on that connection --> what will happen and does comes TAF here in to play? Knowing that we have currently a single instance DB (not yet a cluster)

Is there some mechanismn possible that will start in that situation and say tries some times to auto-reconnect ? (This is what TAF does) --> but does this also works when the client can not reach the DB (has no network at all)

I did tried a simple test, and created the connection + open. Also attached the TAF-failover event. I executed a query which was OK.
I then fysically removed my lan-cable, and tried the query again. My app was in some waiting-mode then. But when I re-attached my lan-cable, nothing TAF-happens, only an exception was thrown. Which stated some TNS writing problems....

PS: I did not tested what happens when I do NOT reconnect my lan-cable. will there be some oracle-timeout-exception in the end ?


I do not know if this kind of connection-loss-problems can be auto-solved by TAF ? Or are there some other functionalities possible ?


Thx,
Fred
goethals.f
 
Posts: 60
Joined: Mon 18 May 2009 13:17

Postby Shalex » Thu 13 Jan 2011 15:56

Fred, thank you for your kind words.

Usage, advantages, and limitations of Transparent Application Failover (TAF) are described in this article of our documentation: http://www.devart.com/dotconnect/oracle/docs/?Failover.html. Please note that this feature is available only in the OCI mode (connection via Oracle Client). The RETRIES and DELAY parameters are set in the tnsnames.ora file.

In the Direct mode you can use the OracleConnection.Ping() method to validate your connection object and handle the result of this check. The time for opening connection can be limited by using the OracleConnection.ConnectionTimeout property.
Shalex
Devart Team
 
Posts: 7460
Joined: Thu 14 Aug 2008 12:44

Postby goethals.f » Thu 13 Jan 2011 16:14

Shalex wrote:Fred, thank you for your kind words.

Usage, advantages, and limitations of Transparent Application Failover (TAF) are described in this article of our documentation: http://www.devart.com/dotconnect/oracle/docs/?Failover.html. Please note that this feature is available only in the OCI mode (connection via Oracle Client). The RETRIES and DELAY parameters are set in the tnsnames.ora file.

In the Direct mode you can use the OracleConnection.Ping() method to validate your connection object and handle the result of this check. The time for opening connection can be limited by using the OracleConnection.ConnectionTimeout property.



Hi,

I did looked already at the mentioned info-docs, but don't completely understand those (and probably the TAF-concept)

But in my app I tested following scenario

*) 1 had only one DB-instance/server, and did modified the tnsnames to include the neede failover stuff

1) DB is running OK
2) I start up my app, and create and open OracleConnection object (in OCI-mode)
3) I fetch a SQL (ExecuteReader) and get data bakc == OK.
4) I always keep the connection open
5) I remove my physical lan-cable (totally no network)
6) I my app: i try to executeReader again
7) I wait for a while (app is currently in waiting / not-responding mode)
8) I physically connect my lan cable again
9) I receiver an ERROR (TNS writer error....)

--> now my question is. Is step 9 the normal behaviour? I thought that by specifying TAF that I would not get an exception in ExecuteReader(...) and that everything would continue to work onde the network was back online ?

But, said again, it could be that the TAF-concept is not designed for this case... Possible the TAF-concept "needs" in some way still the network-connection (on the client). Or does just not work when the client network is gone.


--> sadly, i'm not capable of testing a real server-shutdown, because we don't quite have a test-DB witch we can shutdown.....


If possible,

can you just clarify a little bit more what would be the normal behaviour in my test-demo.


Thx
Fred
goethals.f
 
Posts: 60
Joined: Mon 18 May 2009 13:17

Postby Shalex » Mon 17 Jan 2011 17:52

I have tried two scenarios with dotConnect for Oracle v 6.0.86 basing on the Transparent Application Failover Support article:

1) local server - opened connection, shut down server, let Oracle Client to make several attempts to restore session, started up my server. Here is my log:

Failover began
An error occured, trying again
An error occured, trying again
An error occured, trying again
Failover ended
The result of execution is 5 (successful select query execution)

2) remote server - opened connection, disabled network, let Oracle Client to make several attempts to restore session, enabled network. Here is my log:

Failover began
An error occured, trying again
An error occured, trying again
An error occured, trying again
Failover aborted
An exception on execution: ORA-12571: TNS:packet writer failure

We will investigate the problem with the second case and notify you about the results as soon as possible.
Shalex
Devart Team
 
Posts: 7460
Joined: Thu 14 Aug 2008 12:44

Postby Shalex » Tue 18 Jan 2011 15:23

Shalex wrote:2) remote server - opened connection, disabled network, let Oracle Client to make several attempts to restore session, enabled network. Here is my log:

Failover began
An error occured, trying again
An error occured, trying again
An error occured, trying again
Failover aborted
An exception on execution: ORA-12571: TNS:packet writer failure

We will investigate the problem with the second case and notify you about the results as soon as possible.

This is a designed behaviour. TAF is used only for the server shutdown (local and remote servers). In this and other cases you can use OracleConnection.Ping() to check if connection is valid.
Shalex
Devart Team
 
Posts: 7460
Joined: Thu 14 Aug 2008 12:44

Postby goethals.f » Wed 19 Jan 2011 14:29

Shalex wrote:
Shalex wrote:2) remote server - opened connection, disabled network, let Oracle Client to make several attempts to restore session, enabled network. Here is my log:

Failover began
An error occured, trying again
An error occured, trying again
An error occured, trying again
Failover aborted
An exception on execution: ORA-12571: TNS:packet writer failure

We will investigate the problem with the second case and notify you about the results as soon as possible.

This is a designed behaviour. TAF is used only for the server shutdown (local and remote servers). In this and other cases you can use OracleConnection.Ping() to check if connection is valid.



Hello,

OK thanks for clarifying this up.

So doing a Ping() before each executeReader should be a good idea, or is this exact the same as checking the connection.state == Open ?

A ping() does a real roundtrip to the server i think, and a check on the connection state not ? Or am I again wrong ?


Thx
Fred
goethals.f
 
Posts: 60
Joined: Mon 18 May 2009 13:17

Postby Shalex » Thu 20 Jan 2011 10:47

Yes, you are right. Ping() makes a real roundtrip to the server, and indeed validates connection. connection.State == ConnectionState.Open checks only its state, it can return true if connection is lost physically.
Shalex
Devart Team
 
Posts: 7460
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle